bind failed on port 139 socket_addr=0.0.0.0 (Address already in use)
Michael H. Warfield
mhw at wittsend.com
Wed Oct 13 19:30:07 GMT 1999
On Wed, Oct 13, 1999 at 01:13:43PM -0500, Brian Servis wrote:
> Ok, 'lsof -i tcp' didn't show anything but 'fuser 139/tcp' did.
> And it shows that inetd has got port 139 bound.
> # lsof -i tcp | grep 139
I didn't say grep for 139. Lsof displays the service name if it
appears in /etc/services, so I get a line like this:
smbd 556 root 5u inet 1263 TCP *:netbios-ssn (LISTEN)
I guess I should have been clearer in my instructions to look
for the service associated with port 139. Sorry.
> # fuser 139/tcp
> 139/tcp: 21747
> # ps ax | grep 21747
> 21747 ? S 0:02 /usr/sbin/inetd
> This makes sense to me as /etc/inetd.conf contains:
> netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd
> netbios-ns dgram udp wait root /usr/sbin/tcpd /usr/sbin/nmbd
Yeah... That fits your symptoms alright.
> and /etc/services contains:
> netbios-ns 137/tcp # NETBIOS Name Service
> netbios-ns 137/udp
> netbios-dgm 138/tcp # NETBIOS Datagram Service
> netbios-dgm 138/udp
> netbios-ssn 139/tcp # NETBIOS session service
> netbios-ssn 139/udp
> But if I disable the netbios-ssn and netbios-ns services in inetd.conf
> and start smbd in daemon mode it works. I have always been running smbd
> and nmbd from inetd so what could have changed to cause this to fail?
You can do one or the other, not both. If you had this set up
through inetd before (which really sucks performance wise), you should
not have been able to start up smbd in daemon mode at all. If you could,
then something else was busted before and it's working correctly now.
There were some changes quite some time ago associated with a
socket option SO_REUSEADDR that may have caused some changes in behavior,
but I don't quite see how it would have had an impact on this. I was
thinking that it mostly fixed UDP related security holes. Maybe that
changed something as a side effect.
> Brian Servis
> Mechanical Engineering | Never criticize anybody until you
> Purdue University | have walked a mile in their shoes,
> servis at purdue.edu | because by that time you will be a
> http://www.ecn.purdue.edu/~servis | mile away and have their shoes.
Michael H. Warfield | (770) 985-6132 | mhw at WittsEnd.com
(The Mad Wizard) | (770) 331-2437 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
More information about the samba