statd on remote machine may not be starting up correctly and visualvm user interface does not add connections.
On the remote machine, I created a policy file for jstatd:
grant codebase "file:/home/jonathan/jdk1.8.0_191/lib/tools.jar" {
permission java.security.AllPermission;
};
I then execute jstatd: ./jstatd -p 1199 -J-Djava.security.policy=/home/jonathan/jstatd.policy
It seems to be running and there are no errors which I got when not specifying a port number or policy file.
In visualvm, I'm able to add the remote host but when I try to create a jstatd connection and fill the information, when clicking "ok", the popup just disappears. No errors, no connections under the node, no nothing. I enabled logging and there are no errors.
My questions: 1. Does jstatd REQUIRES an rmiregistry to work? Not specifying a port, will it attempt to connect to a default one (on port 1099)? 2. Running netstat doesn't show any binding on port 1199 which I've designated. 3. Why does visualvm not allow connections to be created?
I think that jstatd man page should answer most of your questions. Regarding connection from visualvm - check VisualVM log file. Are there firewall(s) between visualvm and jstatd?