标签:console jconsole localhost java jmx local catalina als ges
环境:centos 6
hostname -i
如果输出机器ip,则表示正确,如果输出
hostname: Unknown host
查看/etc/hosts内容:
cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
则需要在/etc/hosts中加入以下内容:
127.0.0.1 yourHostName localhost.localdomain localhost4 localhost4.localdomain4
#CATALINA_OPTS CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9999" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" CATALINA_OPTS="${CATALINA_OPTS} -Djava.rmi.server.hostname=192.168.200.41"
截图如下:
不要使用JAVA_OPTS,不然关闭tomcat时,会报错
java.rmi.server.ExportException: Port already in use:
【经验记录】Jconsole Jvisualvm 监控Tomcat
标签:console jconsole localhost java jmx local catalina als ges
原文地址:http://www.cnblogs.com/amosli/p/6000682.html