Connecting jconsole remotely - the principles
Archive - Originally posted on "The Horse's Mouth" - 2009-03-14 16:16:40 - Graham EllisBEWARE - this first is a "shows you how" and is insecure ... I am doing the demo this way because the security requirements add various issues that would complicate the first demonstration of principle.
1. Set up your SERVER to allow jmx remote connections on an otherwise unused port - we have done this by changing the Java options in the catalina.sh script - around line 188 in version 6.0.18 (ahead of the comment shown below) I added 2 lines:
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9876"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
# ----- Execute The Requested Command --------------------------
2. Restart the server via that catalina.sh script
3. Start the jconsole monitor
jconsole 192.168.200.215:9876
Now ... you should go back and add authenticated users ... lots of instructions available - here are some URLs to start you!
http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote
http://forums.sun.com/thread.jspa?threadID=737279
http://java.sun.com/j2se/1.5.0/docs/guide/management/faq.html
http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
If you want to try out this (and all the other Tomcat stuff) with us ... have a look at out Apache httpd / Tomcat course ... you may want to ask for an "extra day" too if you're wanting to go into the more advanced topics in detail.