1
我試圖將VisualVM連接到遠程JMX。的IntelliJ可以連接毫不費力,但VisualVM的失敗,並在日誌輸出如下:JMX連接失敗,「握手失敗......預計JDWP握手」
Listening for transport dt_socket at address: 5005
Debugger failed to attach: recv failed during handshake: Resource temporarily unavailable
Debugger failed to attach: handshake failed - received >< - expected >JDWP-Handshake<
這裏是JVM屬性我傳遞在運行時:
-XX:MaxPermSize=50g -XX:+HeapDumpOnOutOfMemoryError -Xmx50g -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=100.100.100.100 -Dcom.sun.management.jmxremote.port=5006 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
使用的VisualVM 1.3.9。不知道爲什麼它失敗,爲什麼IntelliJ成功。我已嘗試禁用SSL身份驗證等。
好的可以解決大部分的問題,除了我在啓動時啓用JMX並將其設置爲端口...那麼我在這裏丟失了什麼? – crockpotveggies
嗯......我確信調試端口是首先綁定的,所以JMX監聽器可能會在靜默中失敗,但是如果沒有看到你的配置就不難說。或者...也許JMX和jdwp綁定到不同接口上的相同端口? – Nicholas
剛剛更新了我的命令行配置,將JMX端口更改爲5006,仍然沒有骰子,我可以將VisualVM連接到jstatd實例,儘管 – crockpotveggies