我正在尝试使用 JConsole 远程连接到服务器来监视和管理使用在那里注册的 MBean。
我可以通过 VNC 连接到服务器并使用“localhost:8050”在本地运行 JConsole,但是任何通过 IP 地址或主机名进行远程连接的尝试都会失败并出现 NullPointerException。
java.lang.NullPointerException
在
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
在
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:227)
在 sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
在 sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
在 sun.tools.jconsole.VMPanel$2.run(VMPanel.java:280)
我已经阅读了这里和许多其他网站上的其他优秀问答。我尝试使用 iptables 打开端口,编辑主机文件。 ssl 和身份验证已禁用,local.only 已禁用。我已禁用代理并尝试了 JMXServiceURL,但无济于事。
我为什么能够运行 JConsole &本地连接但不能远程连接?
我什至还有第二台服务器,运行 win2008 和 Windows 2008 tomcat,配合得很好!
有什么想法吗?
谢谢!
马丁
I'm trying to remotely connect to a server with JConsole to monitor & make use of the MBeans registered there.
I can VNC onto the server and run JConsole locally with "localhost:8050", but any attempt to connect remotely, via ip address or hostname, fails in a NullPointerException.
java.lang.NullPointerException
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:281)
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:227)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:334)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:280)
I've read through the other excellent q&a's here and on many other websites. I've tried opening ports with iptables, editing the hosts file. ssl and authentication are disabled, local.only is disabled. I've disabled the proxy and tried the JMXServiceURL too, to no avail.
How come i am able to run JConsole & connect locally but not remotely?
I even have a second server, running win2008 & tomcat, that plays along perfectly!
Any ideas?
Thanks!
Martin
发布评论
评论(1)
尝试在您的应用程序服务器上使用此设置。它在 Tomcat 上对我有用。
Try to use this setting on your application server. It worked for me on Tomcat.