【问题标题】:How to check if JMX agent is working in Tomcat?如何检查 JMX 代理是否在 Tomcat 中工作?
【发布时间】:2015-02-16 21:56:07
【问题描述】:

我有一个 Tomcat 8 实例。我正在尝试从 JColsole 连接到它。为此,我在setenv.bat 中添加了以下行:

CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote.password.file=D:\Utils\Apache\Tomcat\conf\remote.users -Dcom.sun.management.jmxremote.access.file=D:\Utils\Apache\Tomcat\conf\remote.acl -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=7777 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost

在这两个文件中 -- remote.usersremote.acl 我定义了用户 test 密码 test 和角色 readwrite .

但是我无法通过 JConsole 连接(我尝试使用 url localhost:7777service:jmx:rmi://localhost:7777)。

进一步调查显示,我什至无法远程登录到 7777。

我做错了什么?

【问题讨论】:

    标签: java tomcat jmx


    【解决方案1】:

    碰巧的是,当 Tomcat 在 Windows 上作为服务运行时,我不需要 setenv.bat,我需要使用 tomcat8w.exe -- 用于添加选项的 GUI 收费

    【讨论】:

      猜你喜欢
      • 2011-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-12
      • 2023-03-30
      • 1970-01-01
      • 2015-08-23
      • 1970-01-01
      相关资源
      最近更新 更多