I couldn't connect to one Tomcat server via JMX in a Linux virtual machine.
There was no firewall running. All seemed ok. By searching on the web I found out that I have to use the
-Djava.rmi.server.hostname property to fix it. It worked, but I don't understand why.
My machine has five Tomcat servers running, all of them have JMX enabled in consecutive ports (8008, 8018, 8028...), all of them have the same configuration and only one of them had this issue connecting JMX.
No firewall, no
-Djava.rmi.server.hostname property in any Tomcat.
I understand the problem, but I don't understand why four of my Tomcat servers worked and one of them not. Why is this?