If you have used the command line ping utility to check simple network connectivity between hosts, you know how useful it is. Well there is a utility like that for Couchbase now. It is aptly named cbping and it will check simple connectivity for a Couchbase cluster or to a remote XDCR clusters.

cbping does simple connectivity tests to Couchbase to check the following kinds of things:

  • Are ports open that Couchbase needs?
  • Elapsed time taken for the ports to connect
  • What nodes are in the cluster? Do the same tests on them as well.

In addition, it can also check the connectivity to XDCR target clusters. Just remember that it is testing connectivity from wherever cbping is running from and not from within the cluster, or a health check from within the cluster. It is a simple “can I connect to this target on these ports”.

To get the script to use, clone the githup repo for cbping.

Here is a sample output of a three node Couchbase cluster:

As you can see it checks all of the ports that Couchbase Server could be running on per the documentation. On the nodes above, not all ports are open and that is ok. The ones that are not open are the ones for encryption, internal calls, other services I am not running on that node (e.g. Query, Index, Data, FTS, etc). If you want to see what each of the ports does in cbping, then put in a -v option in the command line and you will see a description for each, like so:

Posted by Kirk Kirkconnell, Senior Solutions Engineer, Couchbase

Kirk Kirkconnell was a Senior Solutions Engineer at Couchbase working with customers in multiple capacities to assist them in architecting, deploying, and managing Couchbase. His expertise is in operations, hosting, and support of large-scale application and database infrastructures.

Leave a reply