我有一個Web應用程序部署到遠程樹脂服務器,並且它已打開JMX。調試JConsole連接失敗
我可以遠程登錄到遠程服務器即
[email protected]:/tmp$ telnet <remote-ip> 5555
Trying <remote-ip>...
Connected to <remote-ip>.
Escape character is '^]'.
��sr5javax.management.remote.message.HandshakeBeginMessage�,���6profilestLjava/lang/String;Lversionq~xppt1.0^]
telnet> q
Connection closed.
但是用我無法連接到它在我的JConsole
$JAVA_HOME/bin/java -cp $JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:pm-common/lib/jmxremote_optional-1_0_1_3.jar sun.tools.jconsole.JConsole service:jmx:jmxmp://<remote-ip>:5555
我有以下的Java版本試過,但我得到一個「連接失敗'兩個實例。
## where JAVA_HOME=/opt/java/64/jdk1.5.0_22
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)
## where JAVA_HOME=/opt/java/64/jdk1.6.0_17
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
你們是否有任何想法來了解如何調試(即找出哪裏出了問題)?
Ey!那麼缺少的屬性'java.rmi.server.hostname'呢?注意這篇文章:http://www.gubatron.com/blog/2010/11/21/jconsole-connection-failed-retry-solved-java-jmx/!希望能幫助到你! – Victor 2014-11-27 20:07:13
還要確保密碼文件被讀保護!即。只有用戶可以閱讀它 - 用chmod 600 – Mafro34 2015-01-28 07:21:37