tags:

views:

1498

answers:

2
+3  Q: 

VisualVM over ssh

I've read Visual VM remotely over ssh but I think I've not fully understood because it was not working for me :-( Please can someone give some example?

ssh -D 9696 [email protected] and visualvm.exe -J-Dnetbeans.system_socks_proxy=localhost:9696 -J-Djava.net.useSystemProxies=true starts visualvm, but no processes of external machine are shown (only the local ones like visualvm itself). Moreover sometimes (but not always) I got the message "channel 3: open failed: connect failed: Connection refused" in my ssh window.

Any help?

+2  A: 

You either need to run jstatd on the remote side, or specify a JMX connection using host:port.

Jstatd:

jstatd -J-Djava.security.policy=permissions.txt [-p port]

After that: add a remote connection to the target machine, and on the properties of that remote connection configure the jstatd connection.

(permissions.txt contains for example this:

grant {
  permission java.security.AllPermission;
};
ankon
I'm sorry, but I don't get it. I'm able to start the jstatd line on the remote side, but do I have to go there with "ssh -D 9696 me@remote" or is "ssh me@remote" sufficient? I still need the proxy stuff for visualvm - and so on. It's embarrassing but I think I need a step by step guide.
erwin
1) ssh -D 9696 me@remote, and run jstatd as above on the remote command line. If you want jstatd to be on a different port than the default 1099, use the -p argument to jstatd. 2) run visualvm.exe -J-Dnetbeans.system_socks_proxy=localhost:9696 -J-Djava.net.useSystemProxies=true on the local machine 3) in visual vm: add new remote connection, and specify remote as host and the port for jstatd (1099 for default, or what you specified with -p when running jstatd) You should now see the processes on the remote side in visualvm
ankon
Ah, now it works - thank you very much! :-)
erwin
A: 

i am trying to configure JvisualVM to connect remotely to a WAS 6.1 server (on solaris).

what are the options in putty (instead of ssh -D 9696 me@remote).

-wasdmin11

wasasdmin11
Is this an answer or an comment? Did it solve the problem for you?
Joachim Sauer