ControlAltDelete
ControlAltDelete

Reputation: 3724

Jconsole cannot connect

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.

enter image description here

I get this when I try connecting:

enter image description here

Followed by

enter image description here

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

Upvotes: 18

Views: 26643

Answers (5)

Ritesh Singh
Ritesh Singh

Reputation: 223

In my case, I had to make it false and also add a hostname to localhost. Add this in VM arguments in Run Configurations.

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=localhost

enter image description here

Upvotes: 2

Abdul Hakeem
Abdul Hakeem

Reputation: 51

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.

Upvotes: 5

Dexter
Dexter

Reputation: 377

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

-Djava.rmi.server.hostname=localhost

Upvotes: 19

Suvasis
Suvasis

Reputation: 1481

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

-Dcom.sun.management.jmxremote=true

Upvotes: 1

ControlAltDelete
ControlAltDelete

Reputation: 3724

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.

Upvotes: 26

Related Questions