For some reason, I could not see any remote applications in my local VisualVM. It was not a port issue, all the required ports were reachable via telnet.
Googling around, this article finally gave my the important clue: Our network does not have consistent DNS names, so I had to connect to the remote machine via IP address. Setting the
java.rmi.server.hostname
property for jstatd
to the IP address solved the problem.Summary
On the remote machine
Create policy file for jstatdgrant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; };
Start jstatd with this hostname file and the IP address as hostname
jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname=192.168.0.123
On the local machine
Startjvisualvm
and add a Remote Host with the given IP address. A jstatd connection will be established by default. You should now see your remote applications.
1 comment:
many thanks, this saved a days of wasted time
Post a Comment