Verifying Your Couchbase Server Installation
Testing the connection to Couchbase Server can be performed in a number of different ways.
Connecting to the Couchbase web console on a node via a web browser provides basic confirmation that your node is available. You can also use the couchbase-cli command to query your Couchbase Server node to confirm that the node is available.
To verify that clients can connect to your node, you can use either the cbworkloadgen command, or telnet.
The cbworkloadgen command is a python program which performs basic operations (reads and writes) against the Couchbase Server cluster.
Using telnet only checks the memcached compatibility ports and the memcached text-only protocol.
Testing with telnet
The simplest method to determine whether Couchbase Server is running is to use Telnet to connect to the server with the memcached text protocol.
Telnet must be installed on your server to connect to Couchbase Server using this method. It is supplied as standard on most platforms, or can be obtained as a separate package and installed via your operating system's standard package manager.
Connect to the server (via the legacy memcached protocol using Moxi):
> telnet localhost1 11211 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'.
Make sure it is responding (stats is a great way to check basic health):
stats STAT delete_misses 0 STAT ep_io_num_write 0 STAT rejected_conns 0 ... STAT time 1286678223 ... STAT curr_items_tot 0 ... STAT threads 4 STAT pid 23871 ... END
Store a document:
set test_key 0 0 1 a STORED
Retrieve the document:
get test_key VALUE test_key 0 1 a END
quit Connection closed by foreign host. >
All of the memcached protocol's commands will work through Telnet.
Testing with cbworkloadgen
The command cbworkloadgen generates random data then performs reads and writes on this data in Couchbase Server. It is not intended to be a performance benchmarking tool.
To test a Couchbase Server installation using cbworkloadgen, execute the following command, supplying the IP address of the running node:
> cbworkloadgen -n [host]:8091 Thread 0 - average set time : 0.0257480939229 seconds , min : 0.00325512886047 seconds , max : 0.0705931186676 seconds , operation timeouts 0
The progress and activity of the tool can also be monitored within the Couchbase web console.
Further details about cbworkloadgen can be found on its CLI reference page.