james
October 6, 2016, 8:49pm
1
Hi,
I’m evaluating N1Ql to possibly replace our map/reduce. Using cbq for testing.
When I try to create a primary key on our bucket:
CREATE PRIMARY INDEX #primary
ON master
USING GSI
I get the error:
“code”: 5000,
“msg”: “GSI CreatePrimaryIndex() - cause: Index #primary already exist.”
but when I run a query with:
select * from master
limit 1;
I get:
“code”: 4000,
“msg”: “Primary index #primary not online.”
On the server console, the #primary index “Initial Build Progress” is at 0%.
Am I missing something?
Thanks,
James
prasad
October 6, 2016, 11:08pm
3
hi @james , can you check the indexer log for any errors/warnings. Can you verify indexer process is up & running, and are you able to run other queries with secondary indexes?
Try restarting Couchbase services, and drop/recreate the primary index.
Btw, what is the couchbase version & OS/platform?
-Prasad
@james , as the “Initial Build Progress” is at 0%, query will not be able to use the index. Can you check if all the ports mentioned here for index service are accessible:
http://developer.couchbase.com/documentation/server/current/install/install-ports.html
james
October 7, 2016, 12:17am
5
Thanks for the help…
Couchbase version is 4.1. OS is ubuntu.
The only error I see in the logs is
Service ‘goxdcr’ exited with status 1. Restarting. Messages: MetadataService 2016-10-06T19:16:48.712Z [ERROR] metakv.ListAllChildren failed.
I checked the ports: 9100 to 9105 and they’re all open.
I’ll try a restart…
james
December 28, 2016, 10:12pm
6
Just a late update that restarting the server got the indexes to rebuild and everything works now.
Thanks for the help.
1 Like