We are unable to connect to a Java Spring Boot-based Docker container through the JMX port. This container runs a Spring Boot KafkaConsumer that connects to Kafka. However, we are able to connect to the Kafka containers through the JMX port and can retrieve heap dumps and memory footprints.
Could you please guide us on the configurations needed to connect through the JMX port and obtain a heap dump for our container?
For both our container and Kafka containers, we observed that the jps
, jcmd
, jstack
, and jmap
commands do not work.
We have already configured the following:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=7203
-Dcom.sun.management.jmxremote.rmi.port=7203
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=XX.XXX.XXX.XXX
The Java version used in our container is:
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (IcedTea 3.4.0) (Alpine 8.131.11-r2)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
The Java version used in Kafka is:
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (IcedTea 3.4.0) (Alpine 8.131.11-r2)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
We did not find any configuration mismatches, but while JMX provides heap dump details for Kafka, it fails to do so for our container.
1