最近由于tomcat老是内存撑的很大导致访问不了 所以就想监控下内存 在startup.sh 里添加 
JAVA_OPTS="$JAVA_OPTS 
    -Dcom.sun.management.jmxremote.port=19999
    -Dcom.sun.management.jmxremote.authenticate=false 
    -Dcom.sun.management.jmxremote.ssl=false"service iptables stop 我已经把防火墙关了tomcat 能顺利启动 但是这个端口好像不通, 通过 netstat -tln  命令查看 端口不通 本地telnet这个端口也不通所以怀疑是这个端口问题导致我无法连上 谁碰到过这个问题啊 帮帮忙~

解决方案 »

  1.   

    后面 我又在startup.sh里 把添加的配置去掉 改用 
    setenv JAVA_OPTS " -Djava.rmi.server.hostname=172.28.10.52 -Dcom.sun.management.jmxremote.port=19999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
    写到环境变量里 还是一样连不上~
      

  2.   

    我觉得是不是你的JMX服务没有开启啊,正常应该先加Dcom.sun.management.jmxremote参数,然后再加port等配置
      

  3.   

    /etc/hosts  我已经把这个里面的   172.28.10.52   localhost.localdomain localhost localhost指向机器的IP啦 这样jmx 应该就不会有问题啊~