masterhuang

tomcat打开远程调试和jmx远程监控

远程Debug打开

  在catalina.sh中去掉CATALINA_OPTS="$CATALINA_OPTS "-server" "-Xdebug" "-Xnoagent" "-Djava.compiler=NONE" "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=12345的注释,重启后生效。

远程jvm监控

  在setenv.sh中加入CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=10.171.113.244 -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.rmi.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false",在setenv.sh里面写是为了不影响catalina.sh本身结构,重启后生效,通过jconsole连接时需要填写tomcat所属用户的用户名,不需要填写密码。

分类:

技术点:

相关文章:

  • 2021-03-30
  • 2021-07-26
  • 2022-01-11
  • 2021-05-24
  • 2022-02-11
  • 2021-07-26
  • 2021-11-11
猜你喜欢
  • 2022-01-20
  • 2021-12-17
  • 2022-01-01
  • 2022-12-23
  • 2021-05-31
  • 2021-08-31
相关资源
相似解决方案