Error in Sync gateay logs


#1

I have a two node database cluster and I have configured the sync gateway on 3rd node with below config:-

{
“log”: [""],
“adminInterface”: “aafprholdcsg002:4985”,
“interface”: “aafprholdcsg002:4984”,
“databases”: {
“abcd”: {
“server”: “http://aafprholdcdb003:8091”,
“bucket”: “abcd”,
“username”: “syncadmin”,
“password”: “*******”,
“enable_shared_bucket_access”: true,
“num_index_replicas”: 0,
“import_docs”: “continuous”,
“users”: { “GUEST”: { “disabled”: true, “admin_channels”: [""] } },
“allow_empty_password”: true,
“allow_conflicts”: false,
“revs_limit”: 20,
“sync”: function(doc, oldDoc) { if (doc) { channel(doc.channel_name); } }
}
}}

–Error in the logs
2019-02-15T17:33:47.740+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:33:54.757+08:00 [INF] Successfully opened bucket
2019-02-15T17:34:07.497+08:00 [INF] GoCBCustomSGTranscoder Opening Couchbase database abcd on http://aafprholdcdb003:8091 as user “syncadmin”
2019-02-15T17:34:07.498+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:34:14.514+08:00 [INF] Successfully opened bucket
2019-02-15T17:34:37.495+08:00 [INF] GoCBCustomSGTranscoder Opening Couchbase database abcd on http://aafprholdcdb003:8091 as user “syncadmin”
2019-02-15T17:34:37.496+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:34:44.512+08:00 [INF] Successfully opened bucket
2019-02-15T17:34:47.013+08:00 [WRN] RetryLoop for Attempt to connect to bucket : abcd giving up after 14 attempts – base.RetryLoop() at util.go:352
2019-02-15T17:34:47.013+08:00 [ERR] Error opening database abcd: 502 Unable to connect to Couchbase Server (connection refused). Please ensure it is running and reachable at the configured host and port. Detailed error: Unrecoverable GoCB error calling Stats(): operation has timed out – rest.RunServer() at config.go:903
2019-02-15T17:34:47.427+08:00 ==== Couchbase Sync Gateway/2.1.2(2;35fe28e) ====
2019-02-15T17:34:47.427+08:00 [INF] Console LogKeys: [* HTTP]
2019-02-15T17:34:47.427+08:00 [INF] Console LogLevel: info
2019-02-15T17:34:47.427+08:00 [INF] Log Redaction Level: none
2019-02-15T17:34:47.427+08:00 [INF] requestedSoftFDLimit < currentSoftFdLimit (5000 < 65535) no action needed
2019-02-15T17:34:47.427+08:00 [INF] Opening db /abcd as bucket “abcd”, pool “default”, server http://aafprholdcdb003:8091
2019-02-15T17:34:47.428+08:00 [INF] GoCBCustomSGTranscoder Opening Couchbase database abcd on http://aafprholdcdb003:8091 as user “syncadmin”
2019-02-15T17:34:47.428+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:34:54.455+08:00 [INF] Successfully opened bucket
2019-02-15T17:34:56.960+08:00 [INF] GoCBCustomSGTranscoder Opening Couchbase database abcd on http://aafprholdcdb003:8091 as user “syncadmin”
2019-02-15T17:34:56.961+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:35:03.982+08:00 [INF] Successfully opened bucket
2019-02-15T17:35:06.492+08:00 [INF] GoCBCustomSGTranscoder Opening Couchbase database abcd on http://aafprholdcdb003:8091 as user “syncadmin”
2019-02-15T17:35:06.493+08:00 [INF] Auth: Attempting credential authentication http://aafprholdcdb003:8091?http_idle_conn_timeout=90000&http_max_idle_conns=64000&http_max_idle_conns_per_host=256
2019-02-15T17:35:13.512+08:00 [INF] Successfully opened bucket


#3

It looks like your user (syncadmin) is successfully able to connect to the bucket, but not able to retrieve cluster stats. Has the user been granted the cluster read admin role in Couchbase Server?


#4

Many Thanks for your reply.
Yes it is being granted cluster admin and application access on the bucket. I also tried with giving admin access.

Apart from port 8091, 18091 from sync gateway to cluster , do I need to open anything else?
Any ports to be opened from cluster back to sync gateway?

Thanks

I am able to fix it with opening extra ports with range:-
11210 and 8091-8096