Running OpsCenter With a Local Development Cluster

By Nick Bailey -  September 7, 2012 | 3 Comments

OpsCenter is a graphical tool for managing your Apache Cassandra and DataStax Enterprise clusters. While it is useful in monitoring your production Cassandra clusters, a lot of time is spent working with a development cluster when you are building an application. Running OpsCenter against a single node development cluster is straightforward with the current documentation. However, if you are running a multi-node cluster on one machine, OpsCenter requires some additional configuration.

In this post we'll go over how to get OpsCenter to run with a local multi-node cluster. First though, I'll briefly introduce CCM, a tool that makes setting up a multi-node Cassandra cluster on your development machine extremely easy.


For in depth information about CCM, see the github page. For now we'll go over the simple steps for installing and then running a simple 3 node cluster.


> git clone
Cloning into ccm...
> cd ccm/
> sudo ./ install
running install
running build

Now that CCM is installed we can move on to starting a cluster.

Starting a Cluster

Depending on your development environment you may or may not to need to run the next steps. I'm running these steps on OSX, which by default won't allow binding to local interfaces besides Since we are going to start a 3 node cluster, we need to tell the system to let us bind to and

> sudo ifconfig lo0 alias up
> sudo ifconfig lo0 alias up

Now that thats done, we can tell ccm to initialize a and start a 3 node Cassandra cluster for us.

ccm> ccm create local-cluster -v 1.0.11 -n 3
ccm> ccm start
ccm> ccm status
node1: UP
node3: UP
node2: UP

At this point you have a 3 node cassandra cluster all running locally. CCM provides shortcuts for doing things like running 'nodetool ring', but if you already have a copy of Cassandra, the built in tools will work as well.

> ccm node1 ring
Address DC Rack Status State Load Owns Token
113427455640312821154458202477256070484 datacenter1 rack1 Up Normal 6.7 KB 33.33% 0 datacenter1 rack1 Up Normal 6.7 KB 33.33% 56713727820156410577229101238628035242 datacenter1 rack1 Up Normal 6.7 KB 33.33% 113427455640312821154458202477256070484


Installing OpsCenter

Now that we have a cluster running locally, we can install OpsCenter. I'll go through the steps for installing OpsCenter on OSX, but you can find the instructions for other operating systems here. I'm assuming you've already downloaded the latest version of OpsCenter. You can get either the community or enterprise edition here.

> tar -xzf opscenter-2.1.2.tar.gz
> cd opscenter-2.1.2/
> bin/opscenter -f

That will start up the OpsCenter in the foreground. At this point you can point your browser at http://localhost:8888/ to access the OpsCenter UI. It will ask you for the ip of at least one node, the jmx port, and thrift port for your cluster. You can enter for the ip and leave the other options at the default. Click 'Add Cluster' to add your cluster.

Because all 3 nodes can't use the same JMX port, we now need to remove the JMX port option from the configuration OpsCenter just stored. Instead we will tell each agent individually which port to use. First stop the OpsCenter process with CTRL-C and open the 'conf/clusters/local_cluster.conf' file. You will see the following lines:

username =
password =
port = 7199

Simply remove the 'port = 7199' line from the file and save it. Now you can start OpsCenter back up.

Installing Agents

Next, we'll follow a slightly modified version of the instructions for installing agents manually. We need to modify the instructions slightly since we are installing on a single node.

The agent files for OpsCenter are located in the 'agent.tar.gz' file. Since we are going to need 3 agents, we will extract that directory to three different locations. Now we'll configure and start the first agent.

> cd agent1/agent/
> bin/setup
> echo '
jmx_port: 7100
' >> conf/address.yaml
> bin/opscenter-agent
> cd ../../

And the second agent:

> cd agent2/agent/
> bin/setup
> echo '
jmx_port: 7200
' >> conf/address.yaml
> bin/opscenter-agent
> cd ../../

And finally the last agent

> cd agent3/agent/
> bin/setup
> echo '
jmx_port: 7300
' >> conf/address.yaml
> bin/opscenter-agent
> cd ../../

At this point you'll now have a local 3 node Cassandra cluster as well as a working OpsCenter install for monitoring that cluster.

DataStax has many ways for you to advance in your career and knowledge.

You can take free classes, get certified, or read one of our many white papers.

register for classes

get certified

DBA's Guide to NoSQL


  1. Alex says:

    bin/setup and don’t get any output

    1. Nick Bailey says:

      Unfortunately this post is for a much older version of OpsCenter. In the latest version the setup script will not output anything. That is expected and should have worked correctly. Specifically it should have written a configuration file at conf/address.yaml

  2. KC says:

    will this still work for the latest release? I am getting the port conflict with jetty server.


Your email address will not be published. Required fields are marked *

Subscribe for newsletter:

Tel. +1 (650) 389-6000 Offices France GermanyJapan

DataStax Enterprise is powered by the best distribution of Apache Cassandra™.

© 2018 DataStax, All Rights Reserved. DataStax, Titan, and TitanDB are registered trademark of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache Cassandra, Apache, Tomcat, Lucene, Solr, Hadoop, Spark, TinkerPop, and Cassandra are trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.