Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java VisualVM does not show/list my tomcat java process

I am using jdk64 and my java version is 1.6.0_24. I am running both (Tomcat java process and VisualVM) processes as Administrator on Windows Server 2008.

Tomcat is running with -Xmx7196m, where as jvisualvm is running with -Xms24m and -Xmx256m. Could this be the cause?

like image 881
Kuldeep Jain Avatar asked Mar 10 '14 07:03

Kuldeep Jain


People also ask

Does VisualVM work with Java 11?

Use VisualVM bundled with GraalVMGraalVM contains a fully compliant Java SE 8, Java SE 11, and Java SE 17 JDK distribution based on Oracle JDK and OpenJDK.

How does remote process connect to VisualVM?

Now that we have VisualVM running locally and our MyApp. jar running on a remote server, we can begin our remote monitoring session. Right-click on the left panel and select Add JMX Connection: Input the host:port combination in the Connection field in the resulting dialog box and click OK.

How do I monitor remote JVM using VisualVM?

There are two ways to connect a remote JVM application to VisualVM: Either using jstatd or Java Management Extensions (JMX). The jstatd program is an RMI server that bundled with the JDK and monitors JVM and provides an interface to allow remote monitoring tools to attach to JVM running on the localhost.

How do I access Java VisualVM?

You can access VisualVM from the bin directory of the JDK: On a Windows system, start VisualVM by double-clicking jvisualvm.exe. You can also select VisualVM from the Start menu (if Windchill shortcuts are installed). On other systems, start VisualVM by invoking the jvisualvm script.


1 Answers

You need to add the JMX parameters to enable the JMX connection to your application, so add the following parameters:

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

Then You need to add your tomcat process manually, So right click on you localhost node -> Add JMX Connection -> type your port -> OK.

Your tomcat process will be listed in under localhost node.

like image 117
Salah Avatar answered Sep 27 '22 15:09

Salah