Cannot connect to VM in Eclipse

Menezes Sousa picture Menezes Sousa · Oct 28, 2013 · Viewed 50k times · Source

I have suddenly begun getting this weird error when I try to debug any of my projects on Eclipse. I don't remember changing anything for this problem to start so suddenly.

'Launching <my program name>' has encountered a problem.
Cannot connect to VM.

Details of the error:

Cannot connect to VM
com.sun.jdi.connect.TransportTimeoutException

Further, in the console I get the following error:

FATAL ERROR in native method: JDWP No transports initialized, 
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection timed out
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized     
[../../../src/share/back/debugInit.c:750]

Please tell me how to solve this problem. I have searched the whole web for an answer but to no luck.

I tried the following solutions which worked for other people:

  1. Restarted Eclipse, restarted computer.
  2. Change hosts file in etc\ - Remove the comments (#) sign before 2 lines namely,

    127.0.0.1 localhost

    ::1 localhost

    and restarted.

  3. Turned off all firewalls, restarted Eclipse and retried. Still no luck.

Somebody please help me, I'm going crazy.

Thanks

Sousa

Answer

Sebastien Diot picture Sebastien Diot · Nov 4, 2013

I just found this: Avast! 2014 I have it, and so it fits. If you do as well, then that is probably your problem.