gpt4 book ai didi

java - JMX 连接失败,返回 "handshake failed...expected JDWP-Handshake"

转载 作者:行者123 更新时间:2023-11-30 06:50:33 24 4
gpt4 key购买 nike

我正在尝试将 VisualVM 连接到远程 JMX。 IntelliJ 可以轻松连接,但 VisualVM 失败并在日志输出中显示以下内容:

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 身份验证等。

最佳答案

监听 5005 的套接字不是 JMX 监听器,它是 java debug wire protocol听众。因此,VisualVM 将无法连接到该端口,这就是您看到握手失败的原因。

关于java - JMX 连接失败,返回 "handshake failed...expected JDWP-Handshake",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41274317/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com