title: cassandra 1.2 nodetool getting 'Failed to connect' when trying to connect to remote node
body: <p>I am running a 6 node cluster of cassandra 1.2 on an Amazon Web Service VPC with Oracle's 64-bit JVM version 1.7.0_10.</p>
  
  <p>When I'm logged on to one of the nodes (ex. 10.0.12.200) I can run <code>nodetool -h 10.0.12.200 status</code> just fine.</p>
  
  <p>However, if I try to use another ip address in the cluster (10.0.32.153) from that same terminal I get <code>Failed to connect to '10.0.32.153:7199: Connection refused'</code>.</p>
  
  <p>On the 10.0.32.153 node I am trying to connect to I've made the following checks.</p>
  
  <ul>
  <li><p>From 10.0.12.200 I can run <code>telnet 10.0.32.153 7199</code> and I get a connection, so it doesn't appear to be a security group/firewall issue to port 7199.</p></li>
  <li><p>On 10.0.32.153 if I run <code>netstat -ant|grep 7199</code> I see </p>
  
  <p><code>tcp        0      0 0.0.0.0:7199                0.0.0.0:*                   LISTEN</code></p>
  
  <p>so cassandra does appear to be listening on the port</p></li>
  <li><p>The cassandra-env.sh file on 10.0.32.153 has all of the JVM_OPTS for jmx active</p>
  
  <p><code>-Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false</code></p></li>
  </ul>
  
  <p>The only shot in the dark I've seen while trying to solve this problem while searching the interwebs is to set the following:</p>
  
  <p><code>JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=10.0.32.153"</code></p>
  
  <p>But when I do this I don't even get a response. It just hangs.</p>
  
  <p>Any guidance would be greatly appreciated.</p>