JMX连接到VirtualBox上的tomcat [英] JMX connection to tomcat on VirtualBox

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

问题描述

我已经在Tomcat服务器上启用了JMX,

I have enabled JMX on my tomcat server with

-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost,我有一个spring应用程序,该应用程序用JmxRemoteLifecycleListener bean公开了JMX bean:

-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost and I have a spring app that exposes JMX beans with a JmxRemoteLifecycleListener bean:

<Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="10000" rmiServerPortPlatform="10001" />

当我在virtualbox上运行此tomcat实例(使用无业游民)时,我转发了端口10000和10001,但是当我尝试连接至JMX服务(尝试使用VisualVM和JRockit Mission Control)时,无法连接.由于它在VirtualBox上运行,是否需要进行特殊配置以进行连接?

When I run this tomcat instance on virtualbox (using vagrant) I forward ports 10000 and 10001, but when I try to connect to the JMX service (tried with VisualVM and JRockit Mission Control), I am unable to connect. Is there special configuration that needs to be done to connect since it is running on VirtualBox?

推荐答案

您需要使用IPTABLES进行端口转发.只需检查是否在Iptables中启用了端口.

You need to do the Port forwarding with IPTABLES. Just check whether port is enabled in Iptables.

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

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