error: cannot bind socket is observed while Executing this command adb forward tcp:8080 tcp:8080

4,942 views
Skip to first unread message

saorabh singh

unread,
Mar 6, 2012, 10:02:04 AM3/6/12
to seleniu...@googlegroups.com
Hi,
I am using latest version of Selenium ie 2.20 & android-server-2.20.apk
Followed all the steps mentioned in http://code.google.com/p/selenium/wiki/AndroidDriver 
On Executing adb  forward tcp:8080 tcp:8080 command, i am getting error
error: cannot bind socket

Please help me out


Regards,
Saorabh Singh

deben

unread,
Jul 23, 2012, 2:54:39 AM7/23/12
to seleniu...@googlegroups.com
hello saorabh
  hv u got the solution for this socket listener error,if u got then plz tell me the solution because i am also getting same error while i am starting port forward
the error is------

F:\Android\platform-tools>adb forward tcp:8080 tcp:8080
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: cannot bind socket


Thanks & Regards
Debendra kumar sahu

Krishnan

unread,
Jul 25, 2012, 7:54:18 AM7/25/12
to seleniu...@googlegroups.com
Today I was fiddling around with the Android Emulator and was pretty much stuck with the same exact error "cannot bind socket".

The reason behind this error is because, the local port "8080" is already being used by some other application.
Check if there is any TomCat instance running on your machine ?

In my case I was basically trying to do a port forwarding from tcp:5555 to tcp:8080 when I hit this error. After battling with this error for quite sometime and after some vehement googling, here's a thread that helped me : https://groups.google.com/forum/?fromgroups#!msg/appinventor/yvl2BNWPa6E/LTRKsaZmNswJ

When I followed the instructions documented here : http://www.petri.co.il/quickly_find_local_open_ports.htm 

I quickly learnt that my android emulator itself was running on 5555 port which was the reason behind the "Cannot bind socket" error.

I quickly changed my port to another port, and things were working fine after that.

So if you see a "cannot bind socket" error, then it means "the local port that you are trying to forward from" is "BEING" used by some other application.

Hope that helps !

Prashanth sams

unread,
Apr 8, 2013, 9:26:00 AM4/8/13
to seleniu...@googlegroups.com
Open this URL in Firefox, http://localhost:8080/exit    for shutting down the server that is currently running in the port 8080.
One of the servers should have been running in your machine.

Servers can be Selenium, Jenkins, Hudson, etc...

Regards,
Prashanth Sams

On Tuesday, March 6, 2012 8:32:04 PM UTC+5:30, saorabh singh wrote:

Tushar Roy

unread,
Jun 25, 2013, 9:13:45 AM6/25/13
to seleniu...@googlegroups.com
Hello ,

What exactly we need to change here? My emulator is running on port 5037.
8080 is also blocked by something else in my machine.

Thanks.
Reply all
Reply to author
Forward
0 new messages