Samba won't start

Samba won't start

Post by rick » Sat, 31 May 2003 05:48:21



I am running sco OSR 5.0.6. I had samba installed last week and seemed
to be working fine.  I came in monday morning and samba wasn't
started.  So I tried to start it manually with smbd -D and nmbd -D.
However still nothing is starting.  If i do a ps there are no
processes listed.  I am puzzled to what happened becuase nothing has
changed that I know of for it to stop working.

This is what the nmbd.log file has:

[2003/05/29 14:25:15, 0] nmbd/nmbd.c:main(794)
  Netbios nameserver version 2.2.6 started.
  Copyright Andrew Tridgell and the Samba Team 1994-2002
[2003/05/29 14:25:15, 0] lib/util_sock.c:open_socket_in(804)
  bind failed on port 137 socket_addr = 0.0.0.0.
  Error = Address already in use

This is what the smbd.log file has:

[2003/05/29 14:25:15, 0] smbd/server.c:main(707)
  smbd version 2.2.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2002
[2003/05/29 14:25:15, 0] lib/util_sock.c:open_socket_in(804)
  bind failed on port 139 socket_addr = 0.0.0.0.
  Error = Address already in use

This is what is in my /etc/services for port 139.  However i don't
think this is the problem because I have another sco box with this
same line that is working fine.

nb-ssn          139/tcp         nbssn netbios-session

here is my smb.conf file:

# Samba config file created using SWAT
# from 192.168.0.204 (192.168.0.204)
# Date: 2003/05/29 14:13:49

# Global parameters
[global]
        workgroup = MYDOMAIN
        netbios name = BIGMOMMA
        server string = Samba Server
        security = server
        password server = BIGPOPPA

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

Does anyone know why it would just quit working?  I have looked all
over the net at different posts and tried several differnt things over
the past 3 days but I am just stumped.  This is a fresh install of
sco.  Nothing special installed on it except for stuff like gunzup,
webmin.  Please help!

Ricky

 
 
 

Samba won't start

Post by I R A Darth Agg » Sat, 31 May 2003 06:08:44


On 29 May 2003 13:48:21 -0700,

+>   bind failed on port 137 socket_addr = 0.0.0.0.
+>   Error = Address already in use

+>   bind failed on port 139 socket_addr = 0.0.0.0.
+>   Error = Address already in use

+> Does anyone know why it would just quit working?

Your operating system thinks (knows?) that some process has bound
ports 137 and 139 for it's use. If scum unix has an "lsof" command,
you should be able to find out what process has done this to you.

# lsof | egrep '(137|139)'

James
--
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.

 
 
 

Samba won't start

Post by rick » Sat, 31 May 2003 22:57:17



> On 29 May 2003 13:48:21 -0700,


> +>   bind failed on port 137 socket_addr = 0.0.0.0.
> +>   Error = Address already in use

> +>   bind failed on port 139 socket_addr = 0.0.0.0.
> +>   Error = Address already in use

> +> Does anyone know why it would just quit working?

> Your operating system thinks (knows?) that some process has bound
> ports 137 and 139 for it's use. If scum unix has an "lsof" command,
> you should be able to find out what process has done this to you.

> # lsof | egrep '(137|139)'

> James

If I do a netstat -an | grep 139 this is my reply:

# netstat -an | grep 139
tcp        0      0  192.168.0.202.139      192.168.0.201.4693    
ESTABLISHED
tcp        0      0  192.168.0.202.1031     192.168.0.201.139    
ESTABLISHED
tcp        0      0  *.139                  *.*                  
LISTEN

If I do a netstat -an | grep 137 this is my reply:

# netstat -an | grep 137
udp        0      0  *.137                  *.*

This seems to be ok.  Anything else i might try?  lsof was not a
recognized commmand.

Ricky,

 
 
 

Samba won't start

Post by I R A Darth Agg » Sat, 31 May 2003 23:27:06


On 30 May 2003 06:57:17 -0700,


+> > Your operating system thinks (knows?) that some process has bound
+> > ports 137 and 139 for it's use. If scum unix has an "lsof" command,
+> > you should be able to find out what process has done this to you.

+> If I do a netstat -an | grep 139 this is my reply:

I thought about netstat. But it doesn't tell you which process is responsible.

+> # netstat -an | grep 139
+> # netstat -an | grep 137

+> This seems to be ok.  Anything else i might try?

I'm not sure how to coax your system into identifying which process
has those ports tied up. Until they're freed, you can't restart samba.
A reboot will take care of it, but that strikes me as such a Microsoft
solution.

+> lsof was not a recognized commmand.

ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/

lsof is a very useful tool.

James
--
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
isn't looking good, either.
I am BOFH. Resistance is futile. Your network will be assimilated.

 
 
 

Samba won't start

Post by rick » Wed, 04 Jun 2003 22:39:32



> On 30 May 2003 06:57:17 -0700,



> +> > Your operating system thinks (knows?) that some process has bound
> +> > ports 137 and 139 for it's use. If scum unix has an "lsof" command,
> +> > you should be able to find out what process has done this to you.

> +> If I do a netstat -an | grep 139 this is my reply:

> I thought about netstat. But it doesn't tell you which process is responsible.

> +> # netstat -an | grep 139
> +> # netstat -an | grep 137

> +> This seems to be ok.  Anything else i might try?

> I'm not sure how to coax your system into identifying which process
> has those ports tied up. Until they're freed, you can't restart samba.
> A reboot will take care of it, but that strikes me as such a Microsoft
> solution.

> +> lsof was not a recognized commmand.

> ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/

> lsof is a very useful tool.

> James

Well, I rebooted but still nothing.  Get the same result.  I download
a lsof_4.67.gz and after i did a gunzip i wasn't sure if it was
installed or not or exactly how to use it.  I know have a file in my
/tmp directory that is lsof_4.67 and not sure how to install it now.

Is there anything else I might try?

Ricky

 
 
 

Samba won't start

Post by rick » Sun, 15 Jun 2003 03:42:09


Just to let anyone know that might run into this problem.  I was
finally able to get samba started again.  Through the webmin program I
was able to look at all the startup scripts pretty easily.  There was
one called "Netbios".  So I went to the startup script and there was
an option to stop that process.  So I clicked stop.  Then restarted
samba.  And all was good.  I'm not sure if i did something to out this
script in or if it is a default for Sco unix.  Here is what was in the
script.

#!/bin/sh
# The following was generated from
# NLS/english/netbiosrc.gen
#

#
MS_NETBIOSRC=1
STARTING=1
CANT_START=2
STOPPING=3
CANT_FIND_PS=4
STOPPED=5
USAGE=6
:

TCP/IP  source
#
# Copyrighted as an unpublished work.
# (c) Copyright 1987-1995 Legent Corporation
# All rights reserved.
#
#      SCCS IDENTIFICATION
# TPI NetBIOS start/stop script
#
# Usage: /etc/netbios [ start | stop ]
#
if [ -d /etc/conf/kconfig.d ]; then
        PATH=$PATH:/usr/ucb
fi
if [ -d /usr/sbin ]; then
        PATH=$PATH:/usr/sbin
fi

DEFAULT=/etc/default/nbconf
case $1 in
start)
        dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $STARTING "Starting netbios: "
        if [ -r $DEFAULT ]
        then
                . $DEFAULT
        fi

        if [ ! "$NB_ADDR" ]
        then
                #
                # Default to using loopback.
                #
                NB_ADDR="127.0.0.1"
                NB_BROADCAST="127.0.0.1"
                NB_MAXPKT=`su root -c "netstat -in" | grep lo0 | awk '{ print $2 }'`
        else
                INTERFACE=`su root -c "netstat -in" | grep "$NB_ADDR" | awk '{ print
$1 }'`
                if [ ! "$INTERFACE" ]
                then
                        dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $CANT_START "Cannot start
netbios on "
                        echo "$NB_ADDR"
                        exit 0
                fi
                NB_BROADCAST="`ifconfig "$INTERFACE" | awk '/broadcast/ { print $6

Quote:}'`"

                NB_MAXPKT=`su root -c "netstat -in" | grep "$NB_ADDR" | awk '{ print
$2 }'`
        fi
        export NB_MAXPKT NB_ADDR NB_BROADCAST
        /etc/nbd; echo -n "nbd"
        if [ -r /etc/lmhosts ] ; then
                /etc/dlnbhosts
                echo -n " dlnbhosts"
        fi
        echo
        ;;
stop)
        dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $STOPPING "Stopping TPI
NetBIOS...\n"

        # figure out which kernel we're running
        if [ -x /bin/ps ] ; then
            /bin/su root -c "/bin/ps -e" > /tmp/tps$$ 2>/tmp/ps.err$$
            if grep "not the booted" /tmp/ps.err$$ > /dev/null ; then
                PS="/bin/ps -n /unix.old"
            else
                PS="/bin/ps"
            fi
            /bin/rm -f /tmp/ps.err$$
        else
            echo "$0: \c"
            dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $CANT_FIND_PS "Can't find
ps\n"
            exit 1
        fi
        if [ ! -f /tmp/tps$$ ]; then
                /bin/su root -c "$PS -e" > /tmp/tps$$ 2>/dev/null
        fi
        set -- `grep ' nbd$' /tmp/tps$$`
        if [ X$1 != Xstop ] ; then
                kill $1 2> /dev/null
        fi
        /bin/rm -f /tmp/ps.err$$
        dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $STOPPED "TPI NetBIOS
stopped.\n"
        ;;
*)
        dspmsg $MF_NETBIOSRC -s $MS_NETBIOSRC $USAGE "Usage: /etc/netbios [
start | stop ]\n"
        exit 1
        ;;
esac
exit 0

Thanks to everyone in this group that helped.

Ricky,



> > On 30 May 2003 06:57:17 -0700,



> > +> > Your operating system thinks (knows?) that some process has bound
> > +> > ports 137 and 139 for it's use. If scum unix has an "lsof" command,
> > +> > you should be able to find out what process has done this to you.

> > +> If I do a netstat -an | grep 139 this is my reply:

> > I thought about netstat. But it doesn't tell you which process is responsible.

> > +> # netstat -an | grep 139
> > +> # netstat -an | grep 137

> > +> This seems to be ok.  Anything else i might try?

> > I'm not sure how to coax your system into identifying which process
> > has those ports tied up. Until they're freed, you can't restart samba.
> > A reboot will take care of it, but that strikes me as such a Microsoft
> > solution.

> > +> lsof was not a recognized commmand.

> > ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/

> > lsof is a very useful tool.

> > James

> Well, I rebooted but still nothing.  Get the same result.  I download
> a lsof_4.67.gz and after i did a gunzip i wasn't sure if it was
> installed or not or exactly how to use it.  I know have a file in my
> /tmp directory that is lsof_4.67 and not sure how to install it now.

> Is there anything else I might try?

> Ricky

 
 
 

1. Why won't Samba won't stay started in Redhat 7.0 ??

I'm using Redhat 7.0 and for some reason I can't get my samba daemons to
stay
 started.  I put /usr/sbin/smbd -D and /usr/sbin/nmbd -D and the start for a
 about 30 seconds.  I can do a ps -A and see what's running, but then they
 both just die out...  What's the deal here?  Even when I try to get them to
start
 in SWAT, after about 2 minutes it comes back and tells me that they still
aren't started.  Please help...

Mike Johnston

2. Mouse Blanking

3. IIS Default website won't start with WEB Proxy service started

4. IBM OS/2 LAN Server

5. WINS server won't start: Access Denied

6. JAM arrived (finally)

7. Samba NMBD won't start from xinetd.d

8. PCM Service with Exchange Clients

9. Samba won't start

10. Samba won't start on Linux: /lib/libreadline.so.3: undefined symbol : BC

11. URGENT: SAMBA-TNG won't start

12. Samba 2.0.3 won't start on SCO OS 5

13. Samba nmbd daemon won't start