我有普通的Spring启动应用程序,当我从Local Processes组中选择它时,能够使用jconsole连接到该应用程序:
但我想远程连接到我的应用程序。首先,我想从同一台PC连接,但使用远程进程。
我尝试输入localhost:1099和localhost:1199但它没有连接:
我没有传递任何特殊的VM密钥。
如何使用远程进程连接?
当我使用-Dcom.sun.management.jmxremote.port的端口时,我能够连接
必须使用以下java运行时参数启动受监视的应用程序:
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=1199
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
然后在JConsole中,您可以使用localhost:1199连接到远程进程。