开发者

How to remote connect to linux/WASv7 with JConsole?

开发者 https://www.devze.com 2023-02-04 23:07 出处:网络
I\'m trying to remotely connect to a server with JConsole to monitor & make use of the MBeans registered there.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消