Jconsole cannot connect

2019-04-06 21:17发布

问题:

I am using VNC to connect to a server. I am able to VNC into the server, and open Jconsole, but cannot get it to connect to my process whether I include the PID or try connecting using the GUI. The weird thing is all the processes show up in the GUI. See below.

I get this when I try connecting:

Followed by

Is there something I need to do in order to get Jconsole working locally on a Linux server over VNC?

回答1:

Fix found here: You need to pass to the VM:

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false

-- Edit - Fixed the =fals error mentioned in comments.



回答2:

Adding below property as VM argument in Run Configurations --> Arguments --

-Dcom.sun.management.jmxremote=true