1

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?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

2 Answers2

3

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.

Otrozone
  • 283
  • 1
  • 3
  • 8
0

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

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710