Adam Adam - 3 months ago 10
Java Question

JMX is not running on the port specified

I'm trying to enable remote debugging over JMX for a minecraft server but I can't seem to get it working.

I'm using this on the command line to launch it:

java -Dcom.sun.management.jmxremote.port=3000 -jar craftbukkit.jar


Obviously, I haven't setup any authentication or anything but the process seems to launch correctly. I removed all the auth options and nothing has been changed.

However when I run:

lsof | grep 3000

or
netstat | grep 3000


Nothing is returned. Any idea why this isn't listening on the port correctly?

Answer

Add -Djava.rmi.server.hostname = host ip. Along with

-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false

Addition of this -Djava.rmi.server.hostname = host ip forces RMI service to use the host ip instead of 127.0.0.1