Java 远程调试:无法连接到远程 VM。连接超时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27405988/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remote Debugging: Failed to connect to remote VM. Connection timed out
提问by user994165
I was remote debugging with Eclipse on my Ubuntu VM fine to a remote WebLogic application, then it stopped working. I have debug turned on in the remote server. From my VM I'm able to telnet into the remote debugging port. I've tried restarting Eclipse and setting the network connection to Direct. It just keeps timing out.
我在我的 Ubuntu VM 上使用 Eclipse 远程调试远程 WebLogic 应用程序,然后它停止工作。我在远程服务器上打开了调试。我可以从我的 VM telnet 到远程调试端口。我尝试重新启动 Eclipse 并将网络连接设置为 Direct。它只是不断超时。
Failed to connect to remote VM. Connection timed out.
org.eclipse.jdi.TimeoutException
In .log:
在 .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.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
采纳答案by user994165
I bumped up the debug timeout (Windows/Preferences/Java/Debug/Communication/Debugger timeout) and restarted both the admin server and the managed server where the application is deployed and is listening on the debug port.
我增加了调试超时(Windows/Preferences/Java/Debug/Communication/Debugger timeout)并重新启动了管理服务器和部署应用程序并侦听调试端口的托管服务器。
回答by Manish Agrawal
set java.property.debug=true
in the property file may help you.
java.property.debug=true
在属性文件中设置可能会对您有所帮助。
回答by Tiina
Recently I got the same problem, and this is what I found after solved it. If the configuration is wrong from the remote server side, the message should be "connection refused" not "timeout". Besides, "timeout" also does not see any wireshark packets, while "refused" gives:
最近我遇到了同样的问题,这是我解决后发现的。如果从远程服务器端配置错误,消息应该是“连接被拒绝”而不是“超时”。此外,“timeout”也看不到任何wireshark数据包,而“refused”给出:
Finally I found that the network connection of the "timeout" Eclipse is manually configured. You can check this under window->preferences->general->network connections. If it is "manual" (like what I had) change it to "native".
最后发现“超时”的Eclipse的网络连接是手动配置的。您可以在 window->preferences->general->network connections 下进行检查。如果它是“手动”(就像我所拥有的那样)将其更改为“本机”。