如何使用JConsole远程连接linux/WASv7?

发布于 2024-10-12 02:38:31 字数 883 浏览 7 评论 0 原文

我正在尝试使用 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

命比纸薄 2024-10-19 02:38:31
JAVA_OPTS="-Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=<port no> \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=false \
    -Dcom.sun.management.jmxremote.local.only=false \
    -Djava.rmi.server.hostname=<server ip>"

尝试在您的应用程序服务器上使用此设置。它在 Tomcat 上对我有用。

JAVA_OPTS="-Dcom.sun.management.jmxremote \
    -Dcom.sun.management.jmxremote.port=<port no> \
    -Dcom.sun.management.jmxremote.ssl=false \
    -Dcom.sun.management.jmxremote.authenticate=false \
    -Dcom.sun.management.jmxremote.local.only=false \
    -Djava.rmi.server.hostname=<server ip>"

Try to use this setting on your application server. It worked for me on Tomcat.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文