JMX (Java Management Extensions) Question:
Download Job Interview Questions and Answers PDF
How to access JMX (Java Beans) from a process running in docker container?
![JMX Interview Answer JMX Interview Question](https://globalguideline.com/public/images/interview/22.png)
Answer:
You have to expose the JMX port to the host and even used Sun specific options while running the Java process.
You are able to telnet to the host ip and the exposed JMX port, which tells that it is accessible. But I can't figure out a way to use JConsole and connect to the JMX service running in the container.
☛ Djava.rmi.server.hostname=$JMX_HOSTNAME
☛ Dcom.sun.management.jmxremote.port=$JMX_PORT
☛ Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT
You are able to telnet to the host ip and the exposed JMX port, which tells that it is accessible. But I can't figure out a way to use JConsole and connect to the JMX service running in the container.
☛ Djava.rmi.server.hostname=$JMX_HOSTNAME
☛ Dcom.sun.management.jmxremote.port=$JMX_PORT
☛ Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT
Download JMX Interview Questions And Answers
PDF
Previous Question | Next Question |
What are the various actions performed when an application context is created? | What are the advantages of setter dependency injection? |