1.在tomcat/bin/catalina.sh中这句改为:
if [ -r "$CATALINA_HOME"/conf/logging.properties ]; then
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Dcom.sun.management.jmxremote.port=16688" "-Dcom.sun.management.jmxremote.authenticate=false" "-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.password.file=/usr/local/tomcat-6.0.10/conf/jmxremote.password" "-Dcom.sun.management.jmxremote.access.file=/usr/local/tomcat-6.0.10/conf/jmxremote.access" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
fi
2.hostname -i如果是127.0.0.1的话,修改/etc/hostname,增加一句 真实IP 机器名
3.运行jconsole,用远程连接,IP/port
4. shutdown时提示端口Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 16688; nested exception is:
java.net.BindException: Address already in use
5.com.sun.management.jmxremote.authenticate=true,或者Dcom.sun.management.jmxremote.ssl=true还没有研究,用过的兄弟可以补充一下。