使用 jConsole 连接远程 tomcat JMX 实例 [英] Connecting remote tomcat JMX instance using jConsole

查看:29
本文介绍了使用 jConsole 连接远程 tomcat JMX 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 jConsole 连接到远程 tomcat JMX 实例.但是无法连接成功.有什么想法吗?

I am trying to connect to a remote tomcat JMX instance using jConsole. But can't connect successfully. Any Idea?

我在远程 tomcat catalina.sh 中包含了以下选项:

I included the following option in remote tomcat catalina.sh:

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote 
    -Dcom.sun.management.jmxremote.port=9004 
    -Dcom.sun.management.jmxremote.ssl=false 
    -Dcom.sun.management.jmxremote.authenticate=false"

推荐答案

我遇到了类似的问题.如果我在机器上本地启动 jconsole,我就可以连接到 JMX 服务器.

I had a similar, if not the same, problem. I could connect to the JMX server if I started jconsole locally on the machine.

RMI 服务器似乎没有在正确的 IP 上侦听.所以,正如这个相关问题,我添加了以下内容:

It appears the RMI server was not listening on the correct ip. So, as was suggested in this related question, I added the following:

-Djava.rmi.server.hostname=<host ip>

也到JAVA_OPTS,然后就成功了.

这篇关于使用 jConsole 连接远程 tomcat JMX 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆