简体   繁体   中英

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

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 te.net 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)

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

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

在属性文件中设置java.property.debug=true可能对您有所帮助。

** I solved it setting in Eclipse And STS(Spring Tool Suits): Just edit this configuration inside your IDE(Eclipse or Sts) increase your timeout time value by two zero it would be enough. 在此处输入图片说明 Windows --> Preferences --> Java --> Debug --> Debugger timeout: 10000t**

make sure port number is same as debug port number

set JPDA_ADDRESS=8000

port number for connecting your server

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM