Sync-gateway starup fails


#1

I am setting up a basic CB and Sync gateway test environment
I have installed couch base standalone 5.5 and sync gateway 2.1.0 on same server.
i have created a bucket : “Bucket1” which is empty on CB server.
when i start Sync gateway with a test user with roles : “application access” and global read -only access on all buckets.
so now when i start the service , it fails and i see below error which i unable to resolve :frowning:
2018-09-09T02:00:00.326Z [INF] Console LogKeys: [* HTTP]
2018-09-09T02:00:00.326Z [INF] Console LogLevel: info
2018-09-09T02:00:00.326Z [INF] Log Redaction Level: none
2018-09-09T02:00:00.326Z [INF] requestedSoftFDLimit < currentSoftFdLimit (5000 < 65535) no action needed
2018-09-09T02:00:00.326Z [INF] Opening db /db as bucket “Bucket1”, pool “default”, server <ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091>
2018-09-09T02:00:00.326Z [INF] GoCBCustomSGTranscoder Opening Couchbase database Bucket1 on <ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091> as user “test”
2018-09-09T02:00:00.327Z [INF] Auth: Attempting credential authentication ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2018-09-09T02:00:00.330Z [INF] Successfully opened bucket
2018-09-09T02:00:00.334Z [INF] Initializing indexes with numReplicas: 1…
2018-09-09T02:00:00.357Z [INF] Query: Index sg_roleAccess_x1 doesn’t exist, creating…
2018-09-09T02:00:00.360Z [ERR] Error opening database db: Unable to install index roleAccess: Error installing Couchbase index: sg_roleAccess_x1: Unable to create indexes with the specified number of replicas (1). Increase the number of index nodes, or modify ‘num_index_replicas’ in your Sync Gateway database config. – rest.RunServer() at config.go:902
2018-09-09T02:00:00.576Z [WRN] Using deprecated config option: log. Use logging.console.log_keys instead. – rest.(ServerConfig).deprecatedConfigLoggingFallback() at config.go:622
2018-09-09T02:00:00.576Z ==== Couchbase Sync Gateway/2.1.0(121;a036bd8) ====
2018-09-09T02:00:00.576Z [INF] Console LogKeys: [
HTTP]
2018-09-09T02:00:00.576Z [INF] Console LogLevel: info
2018-09-09T02:00:00.576Z [INF] Log Redaction Level: none
2018-09-09T02:00:00.576Z [INF] requestedSoftFDLimit < currentSoftFdLimit (5000 < 65535) no action needed
2018-09-09T02:00:00.576Z [INF] Opening db /db as bucket “Bucket1”, pool “default”, server <ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091>
2018-09-09T02:00:00.576Z [INF] GoCBCustomSGTranscoder Opening Couchbase database Bucket1 on <ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091> as user “test”
2018-09-09T02:00:00.577Z [INF] Auth: Attempting credential authentication ec2-18-216-88-88.us-east-2.compute.amazonaws.com:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2018-09-09T02:00:00.580Z [INF] Successfully opened bucket
2018-09-09T02:00:00.584Z [INF] Initializing indexes with numReplicas: 1…
2018-09-09T02:00:00.609Z [INF] Query: Index sg_channels_x1 doesn’t exist, creating…
2018-09-09T02:00:00.617Z [ERR] Error opening database db: Unable to install index channels: Error installing Couchbase index: sg_channels_x1: Unable to create indexes with the specified number of replicas (1). Increase the number of index nodes, or modify ‘num_index_replicas’ in your Sync Gateway database config. – rest.RunServer() at config.go:902

But in the same couchbase server i have created travel-sample from sample buckets .
so when i change the bucket to travel-sample with the same user it has same access on all buckets then my sync gateway starts and works normally .
what could be the issue ?
i also need steps to open admin console on 4985. ( as this is a test environment i m not bothered about security .

Appreciate your responce.
for reference my config file:
{
“log”: [""],
“databases”: {
“db”: {
“server”: “ec2-.us-east-2.compute.amazonaws.com:8091”,
“bucket”: “Bucket1”,
“username”: “test”,
“password”: “password”,
“enable_shared_bucket_access”: true,
“import_docs”: “continuous”,
“users”: { “GUEST”: { “disabled”: false, “admin_channels”: ["
"] } },
“sync”: function (doc, oldDoc) { if (doc.sdk) { channel(doc.sdk); } }
}
}
}


#2

You need to have setting in sync gateway configuration for index replicas ( databases.foo_db.num_index_replicas ) as 0. Because there is only 1 Index node.

Mark the answer solved if this resolves the issue.