Connectivity issue to remote Couchbase Server 2.0.1

We installed Couchbase Server 2.0.1 on our server. We configured it in Cluster and have one bucket.

End user is located in another country and we have opened firewall for them and IPs are Nated.
ie. if our Couchbase server is installed on 10.35.16.6 and 10.35.16.6, Nated IP is 10.17.71.6 and 10.17.71.7

Telnet using 10.17.71.6 and 10.17.71.7 on port 8091, 11210 is working.

But when they are trying to access it with java-client-1.1.9 to retrieve data using http://10.17.71.6:8091/pools , it’s failing with below error:

12:17:40.465 [http-apr-80-exec-2] INFO c.c.client.CouchbaseConnection - Added {QA sa=/10.35.16.6:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
12:17:40.466 [http-apr-80-exec-2] INFO c.c.client.CouchbaseConnection - Added {QA sa=/10.35.16.7:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
12:17:49.622 [http-apr-80-exec-2] INFO com.couchbase.client.CouchbaseClient - viewmode property isn’t defined. Setting viewmode to production mode
12:18:22.415 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] INFO c.c.client.CouchbaseConnection - Connection state changed for sun.nio.ch.SelectionKeyImpl@10f57dd0
12:18:26.995 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] INFO c.c.client.CouchbaseConnection - Reconnecting due to failure to connect to {QA sa=10.35.16.6/10.35.16.6:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_07]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) ~[na:1.7.0_07]
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:423) [spymemcached-2.9.1.jar:2.9.1]
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:261) [spymemcached-2.9.1.jar:2.9.1]
at com.couchbase.client.CouchbaseConnection.run(CouchbaseConnection.java:288) [couchbase-client-1.1.9.jar:1.1.9]
12:18:26.996 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] WARN c.c.client.CouchbaseConnection - Closing, and reopening {QA sa=10.35.16.6/10.35.16.6:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}, attempt 1.
12:18:27.002 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] INFO c.c.client.CouchbaseConnection - Connection state changed for sun.nio.ch.SelectionKeyImpl@6516eb62
12:18:27.003 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] INFO c.c.client.CouchbaseConnection - Reconnecting due to failure to connect to {QA sa=ldxxxx002.xxxx.net/10.35.16.7:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_07]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) ~[na:1.7.0_07]
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:423) [spymemcached-2.9.1.jar:2.9.1]
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:261) [spymemcached-2.9.1.jar:2.9.1]
at com.couchbase.client.CouchbaseConnection.run(CouchbaseConnection.java:288) [couchbase-client-1.1.9.jar:1.1.9]
12:18:27.004 [Memcached IO over {MemcachedConnection to ldxxxx002.xxxx.net/10.35.16.7:11210 10.35.16.6/10.35.16.6:11210}] WARN c.c.client.CouchbaseConnection - Closing, and reopening {QA sa=ldxxxx002.xxxx.net/10.35.16.7:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}, attempt 1.
12:18:27.004 [http-apr-80-exec-2] WARN c.c.client.CouchbaseConnection - Node expected to receive data is inactive. This could be due to a failure within the cluster. Will check for updated configuration. Key without a configured node is: EVENT_217635405_en-GB.

Please suggest.

Hi,

first, please make sure 3 ports are open against the server: 8091, 8092 and 11210. Also, of course the high ports back to the app servers need to be opened.

second, in general we recommend running both app servers and db in the same datacenter otherwise you may get bad performance, but I’m sure you thought about that.

third, it looks like there is something wrong with your configuration. You said telnetting to the nodes works properly (10.17.71.6 and 10.17.71.7) but your configuration shows the wrong ip adresses:
12:17:40.465 [http-apr-80-exec-2] INFO c.c.client.CouchbaseConnection - Added {QA sa=/10.35.16.6:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
12:17:40.466 [http-apr-80-exec-2] INFO c.c.client.CouchbaseConnection - Added {QA sa=/10.35.16.7:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue

Make sure your NAT is configured correctly and the correct ip adresses are used everywhere. Running behind a firewall requires special care and treatment :slight_smile: