Jvisualvm远程连接tomcat配置:

   JvisualVm 监控远程Tomcat,需要在Tomcat的catalina.sh上加入一段配置:

JAVA_OPTS=" -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.56.102"

   可能会报错:Exception thrown by the agent : 
java.net.MalformedURLException: Local host name unknown: 
java.net.UnknownHostException: badboy: badboy: Name or service not known

  则需要在/etc/hosts 添加 主机名字映射到IP地址

  可以使用hostname -i 查看

猜你喜欢

转载自chenhua-1984.iteye.com/blog/2210528
今日推荐