Sync Gateway Error installing Couchbase index: sg_access_x1

A new community edition cluster has been created. Data from a production server (enterprise edition - using cbbackup) was added to the new cluster using the cbrestore command. The data was restored properly and everything looks good on the Couchbase server. When the Sync Gateway tries to start, the following error occurs.

2020-03-26T01:29:58.397Z [ERR] Error opening database new-database: Unable to install index access: Error installing Couchbase index: sg_access_x1: Error creating index with statement: CREATE INDEX sg_access_x1 ON new-database(ALL (ARRAY ( FOR op IN OBJECT_PAIRS(meta().xattrs._sync.access) END)) with {“num_replica”:1,“retain_deleted_xattr”:true,“defer_build”:true}. Error: [5000] GSI CreateIndex() - cause: Index Replica not supported in non-Enterprise Edition – rest.RunServer() at config.go:1028

Is there a way to delete and sg_access_x1 index and have it recreated by the Sync Gateway?

Have you tried setting "num_index_replicas": 0 in the Sync Gateway config? It looks like Sync Gateway is already trying to recreate indexes, but is unable to create index replicas against a CE cluster.

That did it.

Thanks so much for your quick solution!

Have a great day.

1 Like