问题描述
任何人都在用Java(JMX)进行远程监视.我必须在Linux系统上监视远程Tomcat实例,并且需要在本地窗口计算机上进行监视.我正在通过VPN使用Putty访问远程Tomcat.请帮忙.
anybody work on Remote Monitoring in java (JMX).I have to monitor Remote Tomcat instance on Linux system and i need to monitor on local window machine.i am accessing Remote Tomcat using Putty through VPN.Please help..
我已经尝试通过使用变量JAVA_OPT在tomcat的catalina.sh文件中给jmx端口并在Putty中进一步进行隧道传输,但是我无法通过localhost通过本地主机访问,也可以使用service jmx命令.请帮忙!!!
I have tried by give jmx port in catalina.sh file of tomcat with variable JAVA_OPT and further tunneling in Putty ,but i m not able to access via localhost with port ,also by using service jmx command.please help !!!
感谢您的时间和预先的支持.
Thanks for your time and support in advance ..
推荐答案
远程JMX需要两个端口才能正常运行.默认情况下,第二个(RMI注册表端口)是随机选择的,从而导致防火墙等问题.
Remote JMX needs two ports to operate properly. And the second one (the RMI registry port) is by default picked randomly causing problems with firewalls etc.
自JDK7u4起,您就可以使用
Since JDK7u4 you can use
-Dcom.sun.management.jmxremote.rmi.port=<port>
设置要使用的RMI端口.
to set the RMI port to be used.
有关更多详细步骤,请参见此博客.
See this blog for more detailed steps.
这篇关于远程JMX技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!