Software: Couchbase Community Edition Version 5.1.1 build 5723
Hardware: AWS EC2 ts.large (2 CPUs, 8 GB RAM) (3 Nodes in cluster)
I created an index yesterday in my cluster, but got an error message to the effect that it had timed out and would probably finish later. Here is the n1ql to create the index:
create index account_from_subscription
on `account-details`(si)
where tp = "account"
USING GSI WITH {"nodes":["172.31.19.229:8091"]};
The index was created and I can see it both in my console in the indexes tab and running a query against system:indexes. In the console it just says created and in the query it has the state of ‘pending’.
[Update: I just tried creating another index with indicating the node and it worked fine and I could delete it. The index was created on a different node than the indicated one. Then tried yet another index to that node and am getting the same issues. So this must be related to the node.]
So then I thought, well maybe I need to build it, so I ran a build index query and got the following response:
[
{
"code": 5000,
"msg": "BuildIndexes - cause: Request timed out. Index server may still be processing this request. Please check the status after sometime or retry.\n",
"query_from_user": "build index on `account-details`(account_from_subscription)\nUSING GSI;"
}
]
Checking in the console list - no change. When I run the query against system:indexes, the state is still pending.
So then I decide to drop the index and run the command to do that, result is:
[
{
"code": 5000,
"msg": "GSI Drop() - cause: Fail to drop index on some indexer nodes. Error=Request timed out. Index server may still be processing this request. Please check the status after sometime or retry.\n. If cluster or indexer is currently unavailable, the operation will automaticaly retry after cluster is back to normal.",
"query_from_user": "drop index `account-details`.account_from_subscription;"
}
]
So I figure it takes some time or something. I decide to look at some logs to see if I can see what is going on and the indexer shows some interesting loops where it recognizes an index delete token and says that it should handle this in cleanup, but never actually does anything.
I have let this sit for about 11-12 hours so it should be all done, but it hasn’t. I have attached 2 excerpts from the indexer.log file about 10 hours apart, where you can see the line
Clean up deleted index 3353678333526950753 during periodic cleanup
repeated several times each.
The Activity indicator in the console has never shown the index being built and I did create another index on another bucket and it showed in the activity monitor and even finished building.
Can someone help me with this? Is there some other way to see if the something is going on or to make an action?
indexer_logs.zip (13.0 KB)
Thanks,
Scott