JMX and firewalls… or how to hate RMI slightly less

So at least with Java 1.6 the JVM can use SOCKS for proxying RMI requests, so to get the wonderful jvisualvm (think 1.5 visualGC) working use the following incantations.

This requires the initial RMI registry port is open to the client.

First the initial SSH to server enabling the SOCKS tunnel

$ ssh -D localhost:9696 servername

And now for jvisualvm
jvisualvm -J-Dnetbeans.system_socks_proxy=localhost:9696 -J-Djava.net.useSystemProxies=true

props to http://stackoverflow.com/questions/1609961/visualvm-over-ssh for the hints

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>