I had an issue earlier this week where I needed to remote profile a java process, but it was not using the standard(?) RMI protocol. Some intense googling later, here are the obscure, but simple steps to get this working.
RMI requires two ports to communicate, whereas JMXMP only uses one. You'll need to port forward/tunnel that remote port to a local port. Then start visualvm or jconsole and make sure to add the jmxremote_optional.jar to your classpath.
or
RMI requires two ports to communicate, whereas JMXMP only uses one. You'll need to port forward/tunnel that remote port to a local port. Then start visualvm or jconsole and make sure to add the jmxremote_optional.jar to your classpath.
ssh -L LOCAL_PORT:localhost:REMOTE_PORT REMOTE_HOST
visualvm -cp:a /path/to/jmeremote_optional.jar service:jmx:jmxmp://127.0.0.1:LOCAL_PORT
or
jconsole -J-Djava.class.path=/path/to/jmxremote_optional.jar:$JAVA_HOME/lib/jconsole.jar service:jmx:jmxmp://127.0.0.1:LOCAL_PORT
0 Comments On This Entry
Tags
My Blog Links
Recent Entries
-
-
-
-
-
Remote Profiling with JMXMP
on Nov 16 2019 06:46 PM
Recent Comments
Search My Blog
2 user(s) viewing
2 Guests
0 member(s)
0 anonymous member(s)
0 member(s)
0 anonymous member(s)