Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection

I have Eclipse Indigo installed on Win7 64bit with the ADT plugin and Android SDK's installed.

An error occurs when I have my emulator open and I try to launch my test application:

Failed to initialize Monitor Thread: Unable to establish loopback connection

I have looked into this error and it most often appears to be a firewall issue but with the firewall turned off I still get the error. Would it have anything to do with me having another Eclipse based IDE installed (Aptana 3)?

Things I have tried so far:

  • Turn firewall off
  • changed ddms port to 8601
  • checked localhost is set to 127.0.01

I'm running out of ideas so any help of suggestions would be appreciated.

like image 939
redHouse71 Avatar asked Dec 03 '11 11:12

redHouse71


2 Answers

No need to disable IPV6. Just force Eclipse to use IPV4. Edit eclipse.ini and add the last line:

openFile
-vmargs
-Djava.net.preferIPv4Stack=true
like image 96
Jari Huttunen Avatar answered Nov 06 '22 16:11

Jari Huttunen


Solution : turn off Teredo Tunneling Pseudo-Interface.

This probably converts IP4 to IPv6 addresses or something, resulting in an IPv6 address for your localhost (strange though, that a PING still results in IP4). Anyway, turning it off (Device manager > View > Show hidden devices > right click on Teredo > disable) solves the problem!

I found out by doing a ipconfig /all in the NON working situation. It showed :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface

Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fb:####:###:####:####(Preferred)

Link-local IPv6 Address . . . . . : fe80::3c47:###:####:#### (Preferred)

//edit : I guess it's technically a workaround untill Eclipse supports IPv6

like image 21
Kees Koenen Avatar answered Nov 06 '22 16:11

Kees Koenen