There's a little-known change in the way JMX uses ports that was add to
JDK7u4 which simplifies the use of JMX in a firewalled environment.

The standard RMI registry port for JMX is controlled by the
com.sun.management.jmxremote.port property. The change to Java 7 was to
introduce the related com.sun.management.jmxremote.rmi.port property,
Setting this second property means that JMX will use that second port,
rather than a randomly assigned port, for making the actual connection.
This solution works well in the AWS VPC environment that I'm running in,
and I've heard of others using it successfully as well.

Steve



On Thu, Apr 24, 2014 at 8:38 AM, Chris Lohfink <clohf...@blackbirdit.com>wrote:

> The way RMI (which JMX uses, which is what nodetool uses) works is it will
> first connect, then send a address/port back over the wire for it to make a
> new 2nd connection too.  This will be potentially to a different address
> then 127.0.0.1 (can override with -Djava.rmi.server.hostname=<public name>
> in /etc/cassandra/cassandra-env.sh) and a random port.  Likely the 2nd
> connection is whats timing out.  JMX makes firewalls and sysadmins very
> frustrated :)
>
> ---
> Chris Lohfink
>
>
> On Apr 24, 2014, at 7:05 AM, Jacob Rhoden <jacob.rho...@me.com> wrote:
>
> I've done an install on an amazon instance, and for some strange reason I
> can telnet to the JMX port, but node tool just hangs and doesn't do
> anything. I am hoping I'm overlooking something simple that someone could
> help me point out? Thanks (:
>
> cassandra@t1:/cassandra/db$ telnet 127.0.0.1 7199
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> ^]quit
>
> telnet> quit
> Connection closed.
> cassandra@t1:/cassandra/db$ nodetool -h 127.0.0.1 status
> Failed to connect to '127.0.0.1:7199': Connection timed out
>
> Any pointers would be appreciated. (cqlsh works fine, its just nodetool
> thats giving me the headache)
>
> Thanks,
> Jacob
>
>
>


-- 
Steve Robenalt
Software Architect
HighWire | Stanford University
425 Broadway St, Redwood City, CA 94063

srobe...@stanford.edu
http://highwire.stanford.edu

Reply via email to