I'm trying to get the memory layout of a remote Tomcat visualized with Visual GC in Java VisualVM.
On the Linux server which hosts the Tomcat jstatd is running (including tools.policy and the proper [-J]-Djava.rmi.server.hostname=[SERVER_IP], which is to be found in the jvm options of the Tomcat as well).
The connection from VisualVM to the server/jstatd works properly:
But all i can see in the Visual GC tab of the Jstatd connection are the memory details of the Jstatd JVM itself, not the data of the Tomcat.
Edit: And in the Visual GC tab of the Tomcat connection (prod apl01 jmx) I'm being told: "Not supported for this JVM"
Testing this with a system we run inhouse I get proper data here.
The remote Tomcat runs with it's own user "tomcat". Must jstatd be started by this user as well? Or is there another issue I might be missing?
Any working alternative like another visual tool that provides a visualization similar to the one below would be absolutely acceptable.
We're using Yourkit as well, but I couldn't find anything in there that resembles Visual GC easy to understand style.
Having done some more research and tests on our locale development environment i realized that we haven't had the right permissions on the production environment. So i asked the admin to add jstatd to the sudoers list and voilĂ it works as expected:
sudo /usr/java/latest/bin/jstatd -J-Djava.security.policy=/home/empulse/tools.policy -J-Djava.rmi.server.hostname=[SERVER_IP]