Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.
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)
like image 894
user994165 Avatar asked Dec 10 '14 16:12

user994165


People also ask

How do I fix failed to connect to remote VM connection refused?

1- Open Windows Firewall by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type firewall, and then click Windows Firewall. 2- Click Turn Windows Firewall on or off.

How do I turn off remote debugging?

Go to your android settings and clear app data and cache and reload the app remote debugging will be turned off.

How do I connect to remote debugger?

On the remote computer, find and start the Remote Debugger from the Start menu. If you don't have administrative permissions on the remote computer, right-click the Remote Debugger app and select Run as administrator. Otherwise, just start it normally.

How to fix eclipse failed to connect to remote VM connection refused?

when you have Failed to connect to remote VM Connection refused error, restart your eclipse Sometimes the port which you are trying to access, gets occupied and won't be released. Try some tools to find whether the port is in use or not.

What to do when Tomcat fails to connect to remote VM?

still getting "Failed to connect to remote VM. Connection refused." Restart tomcat in debug mode (using catalina.sh jpda start) Now try to connect and it worked!!!!

How do I debug a remote Java program in Eclipse?

If you're debugging a remote java application, open the debug perspective, check whether there is any vm already attached. Eclipse could not show the debug perspective util it encouter a breakpoint. – Jichao Mar 8 '15 at 9:37 I right-clicked the Debug perspective button and selected reset. It worked accordingly.

Does the JVM allow remote debugging?

then the JVM will listen on the 'localhost' interface and will NOT allow true remote debugging. However, if you say will allow connections from remote machines. Again, I don't know if this is true on other versions of the JVM or other operating systems.


Video Answer


2 Answers

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.

like image 187
user994165 Avatar answered Nov 16 '22 01:11

user994165


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: enter image description here

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

like image 29
Tiina Avatar answered Nov 16 '22 01:11

Tiina