4

For some reason eclipse DDMS always gives the error 'Can't bind to local 86XX for debugger' every time I try and debug my app. This just started today for some reason.

I have looked at many posts and tried what they have suggested such as: 1. Adding 127.0.0.1 localhost to the hosts file and moving ::1 2. stopping and restarting adb 3. Under Window -> Preferences -> Android -> DDMS: Set Base local debugger port to "8601" Checked the box that says "Use ADBHOST" and set the value to "127.0.0.1"

I have also restarted the computer, updated Android platform tools and the eclipse plugin, Downloaded the latest adt-bundle and started the eclipse that is bundled with that.

I have ran netstat -anob and only javaw and adb use ports 8600+.

Does anyone have any ideas what I can try now?

Sasha
  • 492
  • 2
  • 6
  • 21
sam
  • 2,469
  • 8
  • 37
  • 57
  • possible duplicate of [I get an error ddms Can't bind to local 8602 for debugger - no debugging for Android](http://stackoverflow.com/questions/13330264/i-get-an-error-ddms-cant-bind-to-local-8602-for-debugger-no-debugging-for-and) – martin clayton Mar 24 '13 at 16:59

6 Answers6

5

If you are using Linux, I recommend you as well to run this command:

fuser -k 8600/tcp

With this command you will kill any process running at the 8600 TCP port (The one Android is using to debug).

zapotec
  • 2,628
  • 4
  • 31
  • 53
3

I had same problem and none of given solutions worked. Then I have uninstalled all JRE 7 and installed latest JRE 6 (http://www.oracle.com/technetwork/java/javase/downloads/jre6downloads-1902815.html). It have immediately fixed the problem.

KreCi
  • 96
  • 1
  • 4
1

I have the same problem. I tried really everything, all hints from the web. I tried:

  • different versions of JRE and JDE
  • different ports
  • different mobiles
  • modified hosts file
  • changed preferences ddms
  • disabled the firewall completely
  • disabled all IPV6 functionality
  • I restarted the adb every time
  • I use Windows 8

Under many many tried it worked for two times. After exiting the debug session and starting another without any changed, the same shit started again....

BUT: I copied the whole environment path with eclipse and android sdk to antoher windows 8 machine, where it works without any problem!

Pang
  • 9,564
  • 146
  • 81
  • 122
Hügo
  • 11
  • 1
  • 3
    I eventually solved this. It turned out that it was AVG Internet Security that caused the problem. Even adding adb.exe to the exception list did not work. I removed it completely and it works fine now. – sam Nov 30 '12 at 17:59
1

One of the reasons for getting this error could be that there is an existing DDMS session open which is using the port. This is what happened with me. I had Device Manager open when I got this error. After closing the Device manager, I did a clean build and then it worked ! Guess DDMS and debugger are trying to use the same port which results in the problem.

1

If you are using Windows, then kill any process running at the port 8600 using the two following commands:

netstat -a -n -o | findstr :8600

It should give something like

TCP 127.0.0.1:8600 0.0.0.0:0 LISTENING 7508

Then run

taskkill /F /PID 7508 :: replace 7508 with the displayed PID
hzitoun
  • 5,492
  • 1
  • 36
  • 43
0

I solved this problem like this:

  1. open powershell (Available in all windows after XP). Its a command Prompt. Give the command
    > netstat -nao
  2. It will list all the TCP and UDP port that are active on the computer. Find the entry whose local address contain some IP address : 8600. This is the TCP port that you wish to close.
  3. Note the PID of this entry. In the powershell, give another command
    > Stop-Process -Id PID
  4. Here the PID is the one we have noted. Now start the debug from eclipse, it should bind the 8600 port with no further problems.
user2436032
  • 365
  • 1
  • 4
  • 13