Jconsole cannot connect

喜夏-厌秋 提交于 2019-12-05 17:34:57

问题


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:


In my case, I also had to add this option to get Jconsole to connect to the process.

-Djava.rmi.server.hostname=localhost




回答3:


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

-Dcom.sun.management.jmxremote=true



回答4:


Remote JConsole

Add the following parameters to your java Application and run it

-Djava.rmi.server.hostname=DOMAIN_PUBLIC_URL  -Dcom.sun.management.jmxremote.port=PORTNUMBER -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

DOMAIN_PUBLIC_URL - Like your instance public address

PORTNUMBER - 9955

Launch jconsole in your ubuntu from terminal command and go to remote connection and paste the DOMAIN_PUBLIC_URL and PORT and Connect it without username and password like insecure connection.

Make sure to expose the port number on your AWS Server Instance.



来源:https://stackoverflow.com/questions/18294130/jconsole-cannot-connect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!