Jvisualvm connects to remote jstatd not showing applications

I ran jstatd on a remote server (Ubuntu Server 14.04):

 jstatd -J-Djava.security.policy=.jstatd.all.policy -J-Djava.rmi.server.logCalltrue -p 9099 

and try connecting to it using jvisualvm on windows. I checked netstat , the connection is established, and on the remote control it registers a call:

 Sep 11, 2015 12:48:51 PM sun.rmi.server.UnicastServerRef logCall FINER: RMI TCP Connection(4)-10.82.199.0: [10.82.199.0: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)] Sep 11, 2015 12:48:55 PM sun.rmi.server.UnicastServerRef logCall FINER: RMI TCP Connection(4)-10.82.199.0: [10.82.199.0: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)] Sep 11, 2015 12:48:59 PM sun.rmi.server.UnicastServerRef logCall FINER: RMI TCP Connection(4)-10.82.199.0: [10.82.199.0: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)] 

All signs say they work. but, however, applications are not displayed in jvisualvm:

enter image description here

enter image description here

+6
source share
2 answers

Apparently VisualVM expects a consistent DNS name for the server you are trying to connect to remotely (Ubuntu Server 14.04 in your case). Therefore, if you specify an IP address instead of the DNS name for VisualVM, you must add the following to your jstatd start line:

 -J-Djava.rmi.server.hostname=<the IP address to your Ubuntu server here> 

Additionally , I found out that in some versions of VisualVM, specifying a port parameter (-p 9099 in your case) is not supported :

Known limitation: In this version of VisualVM, you must use the default jstatd port and rminame when running the jstatd utility, that is, using the -p and -n options is not supported. VisualVM Troubleshooting Guide

In general, you should try running the following jstatd line on your Ubuntu server:

 jstatd -J-Djava.security.policy=.jstatd.all.policy -J-Djava.rmi.server.hostname=10.82.83.117 -J-Djava.rmi.server.logCalltrue 


Sources

+12
source
 jstatd -p 1099 -J-Djava.rmi.sver.hostname=10.250.105.112 -J-Djava.security.policy=<(echo 'grant codebase "file:${java.home}/../lib/tools.jar" {permission java.security.AllPermission;};') 

Works great for me.

0
source

All Articles