Setting up Tomcat in the Windows platform for monitoring by jconsole or jvisualvm (2008410)
book
Article ID: 297365
calendar_today
Updated On:
Products
Support Only for Apache Tomcat
Issue/Introduction
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.
Environment
Resolution
To enable connections for the Tomcat process on Windows:
The port number 4321 can be any free port that will be used by the JMX listener.
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.
Note: The preceding link was correct as of November 29, 2018. If you find the link is broken, provide feedback and a Pivotal employee will update the link.