远程调试:无法连接到远程 VM。连接超时

新手上路,请多包涵

我在我的 Ubuntu VM 上使用 Eclipse 远程调试远程 WebLogic 应用程序,然后它停止工作。我在远程服务器上打开了调试。从我的 VM,我可以远程登录到远程调试端口。我试过重新启动 Eclipse 并将网络连接设置为 Direct。它只是不断超时。

 Failed to connect to remote VM. Connection timed out.
org.eclipse.jdi.TimeoutException

在.log中:

 !MESSAGE Failed to connect to remote VM. Connection timed out.
!STACK 0
org.eclipse.jdi.TimeoutException
    at org.eclipse.jdi.internal.connect.SocketTransportService.attach(SocketTransportService.java:162)
    at org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:45)
    at org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:134)
    at org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:141)
    at org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:84)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

原文由 user994165 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.4k
2 个回答

我提高了调试超时(Windows/Preferences/Java/Debug/Communication/Debugger 超时)并重新启动了管理服务器和部署了应用程序并正在侦听调试端口的托管服务器。

原文由 user994165 发布,翻译遵循 CC BY-SA 3.0 许可协议

最近我遇到了同样的问题,这是我解决后发现的。如果远程服务器端的配置错误,消息应该是“连接被拒绝”而不是“超时”。此外,“超时”也没有看到任何wireshark数据包,而“拒绝”给出: 在此处输入图像描述

最后发现“超时”的Eclipse的网络连接是手动配置的。您可以在 window->preferences->general->network connections 下检查。如果它是“手动”(就像我所拥有的)将其更改为“本机”。

原文由 Tiina 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题