Java – 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 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.

In .log:

!MESSAGE Failed to connect to remote VM. Connection timed out.
    at org.eclipse.jdi.internal.connect.SocketTransportService.attach(
    at org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(
    at org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(
    at org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(
    at org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(
    at org.eclipse.debug.internal.ui.DebugUIPlugin$

Best Solution

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.

Related Question