Hi,
I am using couchbase 5.0 community server, sync gateway 1.5.0. My sync gateway is working fine with a single cluster. But as per recommendation, couch requires at least two clusters for replication. When I add two servers. My sync_gateway stopped working. If anyone can help me, Please suggest me how to solve this issue. I am getting following log:
"2017-11-29T15:30:37.436Z Enabling logging: [CRUD CRUD+ HTTP HTTP+ Access Cache Shadow Shadow+ Changes Changes+]
2017-11-29T15:30:37.436Z ==== Couchbase Sync Gateway/1.5.0(594;e78dbf1) ====
2017-11-29T15:30:37.436Z Configured process to allow 5000 open file descriptors
2017-11-29T15:30:37.436Z Opening db /profile as bucket “profile_detail”, pool “default”, server http://52.77.82.98:8091
2017-11-29T15:30:37.436Z GoCBCustomSGTranscoder Opening Couchbase database profile_detail on http://52.77.82.98:8091 as user “digiscribe"
2017-11-29T15:31:08.408Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster1-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:31:38.414Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster1-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:32:08.425Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:32:38.446Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:33:08.486Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:33:38.567Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster1-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:34:08.728Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster1-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:34:39.049Z WARNING: Error installing Couchbase design doc: Put http://172.31.31.210:8092/profile_detail/_design/sync_gateway: dial tcp cluster1-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:35:09.690Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:35:40.970Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:36:13.531Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:36:48.652Z WARNING: Error installing Couchbase design doc: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – db.installViews.func1() at database.go:747
2017-11-29T15:36:48.652Z WARNING: RetryLoop for Attempt to install Couchbase design doc bucket : sync_gateway giving up after 12 attempts – base.RetryLoop() at util.go:298
2017-11-29T15:36:48.652Z FATAL: Error opening database: Put http://172.31.30.126:8092/profile_detail/_design/sync_gateway: dial tcp cluster2-ip:8092: i/o timeout – rest.RunServer() at config.go:769”
Please have a look on sync_gateway.json as well. Am i doing something wrong
{
“interface”: “:4984”,
“adminInterface”: “:4985”,
“log”: [“CRUD”, “CRUD+”, “HTTP”, “HTTP+”, “Access”, “Cache”, “Shadow”, “Shadow+”, “Changes”, “Changes+”],
“databases”: {
“profile”: {
“server”: “http://cluster1-ip:8091”,
“bucket”: “profile_detail”,
“username”: “username”,
“password”: “password”,
“enable_shared_bucket_access”: true,
“import_docs”: “continuous”,
“sync”: function(doc) {channel(doc.channels);}
,
“users”: {
“GUEST”: {
“disabled”: false,
“admin_channels”: ["*"]
}
},
“unsupported”: {
“enable_extended_attributes”: true,
“replicator_2”: true
}
},
“CORS”: {
“Origin”: [“http://localhost:4200”],
“LoginOrigin”: [“http://localhost:4200”],
“Headers”: [“Content-Type”],
“MaxAge”: 17280000
}
}
Regards,
Achint