Docker tomcat with jmx


I'm trying to create a docker image with tomcat and JMX activated.

So I clone this tomcat docker image
I exposed the port 1099 and edited the run script as follow:


if [ ! -f /.tomcat_admin_created ]; then

export CATALINA_OPTS="" 
exec ${CATALINA_HOME}/bin/ run

At the moment I don't really consider security, I just trying to have a JMX available.

Next a build the image docker build -t <name> and run it docker run -d -p 8080:8080 -p 1099:1099 <name>

Container is correctly launched and port forward:>1099/tcp,>8080/tcp

And port is open telnet 1099. I use because I'm on macos with boot2docker, and is boot2docker ip.

But when I'm trying to connect to JMX via jconsole I get a timeout..

Best Answer

I found the solution..

I must declare -Djava.rmi.server.hostname=

Related Topic