For remote monitoring of JVM processes (running in a docker container) you will have to activate remote JMX monitoring with the following JVM parameters:
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=[RMI_PORT] -Dcom.sun.management.jmxremote.rmi.port=[RMI_PORT] -Djava.rmi.server.hostname=[EXTERNAL_IP_OF_THE_CONTAINER]
Both RMI_PORTs could have the same value (e.g. 9090). The EXTERNAL_IP_OF_THE_CONTAINER has to be the IP address with which the JVM process is accessible. Localhost or 127.0.0.1 won't work.
The following two parameters completely disable transport encryption and access control. They increase convenience and disable security at the same time:
Given the RMI_PORT=9090, you can launch the process with
docker run -p 8080:8080 -p 9090:9090 --name jmx airhacks/tomee-jmx and
connect with jvisualvm, jconsole, jmc with
NEW online workshop: WebStandards Igniter (online)