Quick tip: Enabling remote access to Tomcat JMX

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.

About these ads

2 responses to “Quick tip: Enabling remote access to Tomcat JMX

  1. Pingback: Monitoring Grails Apps part 1 – Custom JMX MBeans | Lean Java Engineering

  2. Pingback: Quick tip: Enabling remote access to Tomcat JMX « turtle9

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s