Symptom
Enabling JMX Remote
Note: This configuration is needed if you are going to monitor Tomcat remotely. If you are going to monitor it locally, using the same user that Tomcat runs with, then with Java 6 it is not needed at all, and with Java 5 it is as simple as adding -Dcom.sun.management.jmxremote, see Java documentation.
set CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=%my.jmx.port%
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
but cannot connect JMX on Oracle Linux 7.x ...
How to fix
I am having problem using JConsole to connect to a JVM running on Linux. Connecting to JVM running on Windows and Solaris works fine.
This is most likely a configuration problem on the Linux machine or the management properties specified to run the application. Please also see FAQ #a4 about using SSL.
You should check the following:
Check if the hostname correctly resolves to the host address.
Run "hostname -i" command. If it reports 127.0.0.1, JConsole would not be able to connect to the JVM running on that Linux machine. To fix this issue, edit /etc/hosts so that the hostname resolves to the host address.