Resource icon

Configure Jconsole for Remote Access on Tomcat

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

In
this guide we will demonstrate how to remotely monitor tomcat jvm via a remote jmx connection with Jconsole.

upload_2016-12-10_22-55-53.png


For enabling remote monitoring follow below steps:
  1. Enable JMX port on remote tomcat.
  2. Open Jconsole and connect

We will cover both of the above steps in detail in the following section.

Enabling JMX Port on tomcat running on linux servers

Create a setenv.sh(if not exists) file in tomcat bin folder, and put the following values :

Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port={port to access}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname={optional, allow what ip to access this Tomcat}

Replace braces with appropriate values

For Example

Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

Enabling JMX Port on tomcat running on windows servers

Follow steps as mentioned in linux section, just name of the file will be "setenv.bat"

Enabling JMX Port on tomcat running on windows servers as a service

1. Open configure tomcat from start menu

upload_2016-12-10_23-7-28.png


2, In tomcat properties >> Java tab add the four lines as shown below

Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


upload_2016-12-10_23-8-22.png



Open Jconsole and connect via jmx

Jconsole is shipped with any JDK installation. Go to jdk bin folder and open jconsole

upload_2016-12-10_23-12-34.png


Add ip address of remote host and jmx port number and connect

upload_2016-12-10_23-14-25.png


Author
admin
Views
80
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from admin