Remote Management By JConsole


Getting trouble while connecting jconsole with remote process

Here is how to achieve it

As described here http://docs.oracle.com/javase/tutorial/jmx/remote/jconsole.html is not enough

sometimes one more java system property needs to be set which is
java.rmi.server.hostname=

for example in case of Apache Tomcat
follow this
1) Export JAVA_OPTS
export JAVA_OPTS='-Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.1.13'

2) Restart application

3) now from the jconsole connect to 192.168.1.13:9999 by providing credentials

Note : Firewall should be configured to allow these connections (or simply for the time stop iptables services (in linux))

Ref : http://stackoverflow.com/questions/1263991/connecting-remote-tomcat-jmx-instance-using-jconsole

No comments:

Post a Comment