connect to tomcat with JMX

Answering my own question; turned out to be easier than i thought.

Following needs to be done, for enabling JMX access for Tomcat installed as a Windows service, that has a name "ApacheTomcatWindowsServer" for example:

  • Install Tomcat as Windows service, either using the command (first cd into \bin\ )

service.bat install

or your custom scripts.

  • Enable Apache Service Manager for the installed service using the following command:

tomcat7w.exe //MS//ApacheTomcatWindowsServer

This should start Apache Service Monitor program on your system tray. Click on its icon. select 'Configure', click on the 'Java' tab and append the following on the 'Java Options' text box, one option per line:

-Dcom.sun.management.jmxremote.port=8080

-Dcom.sun.management.jmxremote.authenticate=false

-Dcom.sun.management.jmxremote.ssl=false

Save and exit and restart the service.

  • To connect to the JMX console, fire jconsole from your JDK installation, click 'New Connection', specify 'Remote Process' and enter hostname:8090.

https://visualvm.java.net/jmx_connections.html

http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html

posted on   暖风的风  阅读(232)  评论(0编辑  收藏  举报

编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器

导航

点击右上角即可分享
微信分享提示