Friday, February 21, 2014

DataStax AMI EC2 Cassandra JMX Configuration for Jconsole

Purpose

Provide a quick reference when configuring the DataStax AMI for JConsole access.  Datastax is working on updating their documentation for this, but in the mean time, here you go:

Steps

1)  Change the cassandra-env.sh to provide a jmx hostname like the following:
JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<ec2 public name> like ec2-xx-xxx-xxx-xxxx.us-west-1.compute.amazonaws.com"

2) Open up your Security Group to allow access to port 7199 (default Cassandra JMX port) as well as 1024 - 65535 for the machine that you are connecting from.

3)  Start JConsole using the following service:jmx:rmi://ec2-xx-xxx-xxx-xxxx.us-west-1.compute.amazonaws.com:7199/jndi/rmi://ec2-xx-xxx-xxx-xxxx.us-west-1.compute.amazonaws.com:7199/jmxrmi

Note: use an insecure connection if ssl is disabled (what i did)

That should do it.

2 comments:

  1. can u please guide for google compute engine I am facing the issue and followed the same process but i could not figure it out

    ReplyDelete
    Replies
    1. Did you ever get this working?

      I have my JMX auth working as DataStax instructs but I am still unable to get my local jConsole to connect to my machine, I can telnet in but I keep getting unable to connect via SSH and then timeout via 'insecure connection'

      Delete