I double checked the following:
- I run jvisualvm in the same field where Tomcat works.
- This is Java 6u19.
- My Tomcat service works as the same user with whom I am registered as.
- My Tomcat service uses the same JVM directory that I use jvisualvm with.
- Tomcat has JMX enabled on a specific port, but I don't think this will help me.
With all this, I see my Tomcat process in the "Local" list for jvisualvm. It appears as "<Unknown application> (pid 5644)". If I double-click on it, then on each tab βNot supported for this JVMβ is displayed. However, VisualVM appears in Local, and all the tabs work for it, obviously using the same JVM instance. There is no obvious way to add a JMX connection to an instance of "<Unknown Unknown>".
I see the Tomcat JMX instance in "Local" as "localhost: (my port number)" and it works, but the Visual GC tab displays "Not Supported for this JVM", which I suppose means Visual GC is not works through JMX.
What am I doing wrong? I tried running jstatd. It didnβt matter. When I run jstatd, visualvm sees "Local" "jstatd", but when I double-click on it, it just keeps track of this jstatd process, and not any other Java process.
NOTE. I decided to try launching Tomcat not as a service, but directly in the CMD window, but viola, now visualvm works fine. I thought I would try this when I launched "jps" and received a complaint "process information is not available" and Google for this and found someone who said they received it when they ran any Java application as a service. This helps in testing, but does not help to figure out how to control the production system.
This Tomcat runs as a Windows service under the Tanuki shell on Windows Server 2003.
Eddie source share