Robin Bramley is a hands-on Architect who has spent the last decade working with Java, mobile & Open Source across sectors including Financial Services & High Growth / start-ups. Prior to that he helped UK Police Forces with MIS /reporting & intelligence systems. He has contributed to a wide variety of Open Source projects including adding Open ID support to Spring Security. Robin is a DZone MVB and is not an employee of DZone and has posted 24 posts at DZone. You can read more from them at their website. View Full User Profile

Quick tip: Enabling remote access to Tomcat JMX

06.03.2011
| 8716 views |
  • submit to reddit

If you want to connect JConsole/VisualVM to a remote Tomcat or set up Opsview check_jmx with Tomcat, then you’ll need to enable remote JMX support.

This can be achieved with the following JVM settings in /etc/default/tomcat6 on Debian (line breaks added for clarity):

# Add JMX support
JAVA_OPTS="$JAVA_OPTS
-Dcom.sun.management.jmxremote.port=1616
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"

This configuration would typically be locked down with iptables.

For the complete list of settings (e.g. SSL / password controlled access) see the remote section of the JMX guide.

 

 From http://leanjavaengineering.wordpress.com/2011/06/02/tomcat-remote-jmx-access/

Published at DZone with permission of Robin Bramley, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)