Hi I’m running SG 2.7 on localhost and Couchbase CE 6.5 on a remote server (deployed using docker). Below is my config settings:
{
"log": ["*"],
"CORS": {
"Origin": [
"http://localhost:1234",
"http://localhost:4200",
"http://localhost:4300"
],
"LoginOrigin": [
"http://localhost:1234",
"http://localhost:4200",
"http://localhost:4300"
],
"Headers": ["Content-Type", "Authorization"]
},
"databases": {
"fs_db_v0": {
"server": "http://159.203.117.96:8091/",
"bucket": "fs-bucket-v0",
"username": "bucket_user",
"password": "password",
"enable_shared_bucket_access": true,
"import_docs": true,
"num_index_replicas": 0,
"sync": "function(doc, oldDoc) {\n if (doc.replRole) {\n requireRole('replicator');\n if (doc.replRole !== 'replicator') {\n requireRole(doc.replRole);\n channel(doc.replRole);\n if (doc.channels && doc.channels.length) {\n doc.channels.each(function(channel) {\n channel(doc.replRole + '_' + channel);\n });\n }\n }\n } else {\n requireRole('sync_daemon');\n channel(doc.channels);\n }\n}",
"users": {
"test": {
"password": "password",
"admin_channels": ["repayments_2404_260_159"]
},
"sync_daemon_user": {
"password": "password",
"admin_roles": ["sync_daemon"],
"admin_channels": ["*"]
}
}
}
}
}
I am however getting the following warning in the SG Logs
2020-05-20T13:18:56.745+02:00 [WRN] Error processing DCP stream - will attempt to restart/reconnect if appropriate: worker connect, server: 172.17.0.2:11210, err: dial tcp 172.17.0.2:11210: connect: operation timed out. -- base.(*DCPReceiver).OnError() at dcp_feed.go:134
I believe this is preventing changes made by the SDK to be propagated into Sync Gateway and I cannot see and documents via the /_all_docs endpoint or even the /_changes endpoint.
I need helping with networking Sync Gateway to the correct tcp service in the docker container running Couchbase Server.