gstackoverflow
gstackoverflow

Reputation: 37034

How to connect to local application via jconsole using remote process?

I have ordinary spring boot application and am able to connect to that application using jconsole when I choose it from the Local Processes group:

enter image description here

But I want to connect to my application remotely. Firstly I want to connect from the same PC but using remote process.

I tried to type localhost:1099 and localhost:1199 but it doesn't connect:

enter image description here

I didn't pass any special VM keys.

How can I connect using remote process?

Upvotes: 1

Views: 3701

Answers (2)

Otrozone
Otrozone

Reputation: 293

The monitored application must be started with following java runtime arguments:

-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=1199
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

Then in JConsole you can connect to remote process using localhost:1199.

Upvotes: 3

gstackoverflow
gstackoverflow

Reputation: 37034

I was able to connect when I used port from -Dcom.sun.management.jmxremote.port

Upvotes: 0

Related Questions