Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to VM in Eclipse

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

like image 216
Menezes Sousa Avatar asked Oct 28 '13 11:10

Menezes Sousa


People also ask

How do I view a VM in Eclipse?

To see the one Eclipse is runing under, go to Help->About Eclipse Platform->Configuration Details, and look for the property eclipse. vm. Show activity on this post.


2 Answers

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

like image 152
Sebastien Diot Avatar answered Sep 30 '22 04:09

Sebastien Diot


I am using Mac and I ran into similar issue. I made the changes to /etc/hosts file earlier, which I have reverted now to make it as below :-

    127.0.0.1       localhost

And restarted the system and fixed my issue.

like image 29
Arpan Avatar answered Sep 30 '22 03:09

Arpan