Why can't I attach jvisualvm to a tomcat instance running from inside osx?

I start tomcat from inside netbeans. I would like to track heap usage on this tomcat instance, so I run jVisualVM. However, this process is not specified. Any ideas?

+4
source share
1 answer

Are you using Java version 6u24? Then you may fall prey to this error , which will be fixed in 6u25 (in a nutshell, jVisualVM cannot find your hsperfdata process).

Otherwise, you must enable monitoring through JMX:

Pass the following JVM parameters to Tomcat:

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

Then add the remote process to jVisualVM via File -> Add JMX Connection. You can connect to the process using port 8888

jVisualVM has some other gotchas, for example. the user starting jVisualVM should be the same as the user owning the process you want to control (although, I don't think this is your problem). More details here .

+6
source

All Articles