How to configure jmx port for karaf in docker container?

Viewed 861

I would like to use visualvm to check threads running in the karaf which is in a docker container.

What I did:

  1. expose 44444 and 1099 for the docker
  2. in org.apache.karaf.management.cfg, tried setting rmiRegistryHost and rmiServerHost several times with different combination of docker container ip and docker inner ip which doesn't work.
  3. tried change EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=${docker-container-ip} -Dcom.sun.management.jmxremote.local.only=false"

Need help.

1 Answers
Related