Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Setting up Tomcat in the Windows platform for monitoring by jconsole or jvisualvm (2008410)

Purpose

When Tomcat is run under a service wrapper in Windows, it is generally inaccessible to local monitoring because the Java process is hidden by the service wrapper.
 
This article provides information on opening a JMX port for access by jconsole, jvisualvm, and other profilers. This approach can also be used to enable monitoring from a remote machine.

Resolution

To enable connections for the Tomcat process on Windows:
  1. Click the Java tab in the Tomcat monitor.
  2. Add these JVM options:

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

    The port number 4321 can be any free port that will be used by the JMX listener.

  3. Stop and restart the Tomcat service.

You can now start jconsole or jvisualvm from a command window (jconsole.exe and jvisualvm.exe are supplied by the JDK) and specify a connection to localhost with the port given for the JMX listener.

Additional Information

Ensure that the remote JMX access is secured as it allows complete control over the server.
 
For more information on securing the JMX connection, see Monitoring and Management Using JMX Technology.

Note: The preceding link was correct as of November 15, 2011. If you find the link is broken, provide feedback and a VMware employee will update the link.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 1 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 1 Ratings
Actions
KB: