Search code examples
remote-debuggingjmxmicronautvisualvm

VisualVM not able to connect to JavaApp Inside Container


I have spin up one container which is running a micronaut app inside it. I have passed all required JVM arg for JMX connection but still VisualVM/Jconsole not able to connect to it.

Container Command

VisualVM connection Issue

When I am trying to pass localhost:1099, connection is greyed out and not showing any process.

Could someone please suggest what all things I can check here.

Regards,


Solution

  • There's no need to run jstatd with policy. After adding below additional jvm args, I was able to connect jmx client to application.

    -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.rmi.port=1099