Remote Debugging: Failed to connect to remote VM. Connection timed out

自作多情 提交于 2020-01-10 03:54:42

问题


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.

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

In .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)

回答1:


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.




回答2:


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:

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".




回答3:


set java.property.debug=true in the property file may help you.



来源:https://stackoverflow.com/questions/27405988/remote-debugging-failed-to-connect-to-remote-vm-connection-timed-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!