Database Reference
In-Depth Information
It requires some work to get JConsole connected to your Cassandra instance running with-
in EC2 from outside the security group without compromising its security. The suggested
way is to connect via a Secure Shell ( SSH ) tunnel. Setting up an SSH tunnel is beyond
the scope of this topic. You may refer to articles online. Refer to the online article at ht-
tp://simplygenius.com/2010/08/jconsole-via-socks-ssh-tunnel.html for information on us-
ing an SSH tunnel to connect to JConsole.
Note
You may want to add your local machine's external IP to Cassandra's security group and
open all the TCP ports (0 to 65535) to it. By doing this, you are compromising the secur-
ity of the server. It is not a recommended way to get around this problem. Remember to
remove this entry once you are done with the JConsole task.
If you have a server set up with different internal and external IPs, you may need to con-
figure an RMI host name. Open config/cassandra-env.sh and add the hostname
parameter for JMX as part of JVM_OPTS in the following manner:
JVM_OPTS="$JVM_OPTS
-Djava.rmi.server.hostname=174.129.145.160"
JVM_OPTS="$JVM_OPTS
-Dcom.sun.management.jmxremote.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS
-Dcom.sun.management.jmxremote.ssl=false"
JVM_OPTS="$JVM_OPTS -
Dcom.sun.management.jmxremote.authenticate=false"
AWS users may need to put a public DNS name provided for the Cassandra node. Once
you are connected to the node, you can see an overview of the JVM on that node (refer to
the previous screenshot). Look through the tabs and analyze them more closely. Interest-
ingly, you can see a spike in the memory usage, CPU usage, and thread counts. This is the
duration in which a sample stress was running.
To execute various JMX operations provided via JConsole, you will need to switch to the
MBeans tab. Expand the various menu items in the bar on the left-hand side of the screen.
The interesting ones are under org.apache.cassandra.* . For example, you can clear the
value of hinted handoff for a node that is dead before the configured timeout
( max_hint_window_in_ms ) for that node arrives.
Search WWH ::




Custom Search