【发布时间】:2015-07-11 01:44:04
【问题描述】:
我有一个在远程 Linux 服务器上运行的 Java 8 应用程序,需要将 JConsole 附加到它以进行调试。
我在本地机器上设置了一条到远程机器的隧道:
ssh -fN -L 9999:localhost:9999 myuser@1.11.11.111
在远程机器上,我使用以下系统属性运行应用程序:
java -Dcom.sun.management.jmxremote.port=9999 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.local.only=false \
-cp foo.jar:config com.foo.bar.Main config/blah.properties
但是当我启动 JConsole 时,我得到安全连接失败。
如果我点击“不安全的连接”,我会得到
我怎样才能解决这个问题?
【问题讨论】: