Thursday, January 27, 2011

"Address already in use" error from socket bind, when ports are not being used

I can not bind (using C or python sockets) to any port in the range: 59969-60000

Using lsof, netstat and fuser I do not see any processes using these ports.

Other ports such as 59900-59968 and 60001-60009 I can bind to them.

My OS: is CentOS release 5.5 (Final) 2.6.18-194.3.1.el5

There must be something missing? Anyone have any idea how to debug why this port range is not usable?

Cheers, Ivan

  • I would check local firewall settings. Since iptables is not a separate process it will not usually show up in lsof, netstat, and fuser.
    What is the output to "sudo iptables -L -n"?

    From flashnode

0 comments:

Post a Comment