Remote couchbase server timeout

My client code uses clientLibrary in .NET. It talks to a remote couchbase server via CouchbaseClient(). I have encountered a connection issue. If the client doesn’t send requests to the remote server in few minutes it seems the connection is closed. The result is the server cannot find the document client requested. But I don’t have this problem if couchbase is on local machine.

I know CouchbaseClientSection in web.config has a lot of options, not sure which one to look at.

Looks like your client cannot reach particular ports on the server.

There could be several issues:

  1. firewall is blocking ports on your remote server
  2. remote server has several network interfaces and the Couchbase picks private interface, which isn’t accessible from your client.
  3. combination of above

Here is how you can verify it. Lets imagine you have remote server at node.avsej.net (i’m not familiar with windows, therefore I will use online tools)

  1. download cluster configuration in JSON format http://node.avsej.net:8091/pools/default
  2. find array nodes. in our case it will be

    "nodes": [
    {
    “systemStats”: {
    “cpu_utilization_rate”: 2.383939774153074,
    “swap_total”: 536866816,
    “swap_used”: 708608
    },
    “interestingStats”: {
    “couch_docs_actual_disk_size”: 8449780,
    “couch_docs_data_size”: 8435712,
    “couch_views_actual_disk_size”: 0,
    “couch_views_data_size”: 0,
    “curr_items”: 0,
    “curr_items_tot”: 0,
    “mem_used”: 16850432,
    “vb_replica_curr_items”: 0
    },
    “uptime”: “337”,
    “memoryTotal”: 518803456,
    “memoryFree”: 58204160,
    “mcdMemoryReserved”: 395,
    “mcdMemoryAllocated”: 395,
    “couchApiBase”: “http://50.116.6.84:8092/”,
    “clusterMembership”: “active”,
    “status”: “healthy”,
    “thisNode”: true,
    “hostname”: “50.116.6.84:8091”,
    “clusterCompatibility”: 131072,
    “version”: “2.0.1-170-rel-community”,
    “os”: “i686-pc-linux-gnu”,
    “ports”: {
    “proxy”: 11211,
    “direct”: 11210
    }
    }
    ]
  3. Now you should pull hostname keys and check if it is possible to reach this hostname with ports 8091, 11210 and 8092 from your client.

Read more:
Ports Couchbase is listening at: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-network-ports.html
How to use DNS name instead of IP address for host indentification (see point 3.): http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-getting-started-setup.html

Hi, Thank you for the reply. I wasn’t clear in my question. My client is able to reach the remote server, in most cases it works fine. But if the client rests for a couple of minutes and reach the server again it gets the problem I described. I did opened the ports on the server:
8091
8092
11210
11211

June

Hi, Thank you for the reply. I wasn’t clear in my question. My client is able to reach the remote server, in most cases it works fine. But if the client rests for a couple of minutes and reach the server again it gets the problem I described. I did opened the ports on the server:

8091
8092
11210
11211

June