Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to connect through sync_gateway to remote server

I am trying to start sync_gateway from cmd with following command:

sync_gateway -url http://75.76.221.21:8091

I received following error:

20:33:23.014229 WARNING: Error installing Couchbase design doc: Put http://192.168.2.102:8092/sync_gateway/_design/sync_gateway: dial tcp 192.168.2.102:8092: ConnectEx tcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -- db.installViews() at database.go:29120:33:44.055739

WARNING: Error installing Couchbase design doc: Put http:/_design/sync_housekeeping: dial tcp 192.168.2.102:8092: ConnectExtcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -- db.installViews() at database.go:30520:33:44.055739

FATAL: Error opening database: Put 192.168.2.102:8092/omnibazaar/_design/sync_housekeeping: dial tcp 192.168.2.102:8092: ConnectEx tcp: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. -- rest.RunServer() at config.go:415

like image 638
Waqas Avatar asked Nov 09 '22 02:11

Waqas


1 Answers

How did you name your nodes in your Couchbase instance? If you look at the Server Nodes tab, is one of your nodes named "192.168.2.102". I see that from your sync gateway machine, you are trying to reach the Couchbase cluster using the 75.76.221.21 address. Have you checked network connectivity, from your sync gateway machine, try "telnet 192.168.2.102 8092" and see if it connects.

One other thing, it is more common to start sync gateway by redirecting in a configuration file, you can find them in the examples directory. For instance "sync_gateway < examples/config-server.json"

like image 113
beamatronic Avatar answered Jan 03 '23 18:01

beamatronic