0

I have a java process on a linux server, which runs with this option: -Dcom.sun.management.jmxremote

So I cannot just connect to this process via jconsole running on my local pc (because neither port nor -Dcom.sun.management.jmxremote.ssl=false options are set up).

But still, how can I connect to the application and run some operations over some of its MBeans? It this possible? I have a ssh access to the server and would be able to run it "locally" on the server (but not changing the options unfortunately)

javagirl
  • 1,635
  • 6
  • 27
  • 43

1 Answers1

0

According to JMX documentation the -Dcom.sun.management.jmxremote option

Enables the JMX remote agent and local monitoring via JMX connector published on a private
interface used by jconsole. The jconsole tool can use this connector if it is executed by 
the same user ID as the user ID that started the agent. No password or access files are 
checked for requests coming via this connector.

The naming is a bit unfortunate because it in fact enables the local monitoring only.

Since you can not change the options but can access the server via SSH the only option is to use X server forwarding (ssh -X ...) and run jconsole (or better yet jvisualvm which has specific optimisations for running remotely).

JB-
  • 2,615
  • 18
  • 17