Solve Problems Related to remote connection failure when centos6.5 uses JMX
Environment Description
- System: centos6.5;
- Tomcat: 5959,use commons-daemon-native.tar.gz to Configure Automatic startup;
- Java: 1.7.0 _ 75-b13;
- /Etc/hosts:
- $ ServerIp localhost
- : 1 localhost. localdomain localhost6 localhost6.localdomain6
- $ ServerIp iZ258xcfjroZ localhost
- Jmx Configuration:
- -Dcom. sun. management. jmxremote
- -Dcom. sun. management. JMX remote. port = 9115
- -Dcom. sun. management. jmxremote. authenticate = false
- -Dcom. sun. management. jmxremote. ssl = false;
- Firewall Enabled
Cause Analysis
- If you use commons-daemon-native.tar.gz to configure tomcat to start automatically, the jmx configuration cannot be added to $ CATALINA_HOME/bin/catalina. sh, because the file is not used when the system starts, you need to add the jmx configuration in/etc/init. d/tomcat7 STARTUP script; check whether the jmx service is started by sudo netstat-anp | grep 9115;
- Firewall must be disabled because other ports are used for jconsole connection. This port is random;