[Samba] nmbd hangs up after a few hours, kill -9 needed

Gerardo glpuga at barcala.ing.unlp.edu.ar
Tue May 9 21:22:48 GMT 2006


Hi

I´ve been seeing this issue since we updated from Samba 2.X to 3.Y, and 
I wanted to know if anyone has seen this:

I have a samba PDC mantaining a domain composed of WinXP, Win200 and 
win98 machines with shared folders and user authentication (smbpasswd).

It works fine for hours but then everybody stops being able to logon. 
When anyone tries to login in a WinXP machine, it only replies something 
like "Domain is not available".

Restarting the daemons using the init.d script /etc/init.d/samba (Debian 
Sarge) doesn´t work because nmbd seems to have hung up and SIGTERM 
doesn´t work. smbd stops however.

I have to run "killall -9 nmbd" in order to kill the nmbd process. Then 
I restart samba using /etc/init.d/samba and everything is fine again for 
a few more hours (sometimes only minutes).

I updated samba to 3.0.20c from another 3.0.X version (i don´t remember 
wich one) but the problem stayed the same.

Currently i´m using running a crontab script that once every minute 
checks to see if nmbd is alive and restarts samba when nmbd hangs.

RET=`nmblookup -M DOMAINNAME | grep "name_query failed"`

if [ "$RET" != "" ]; then
         /etc/init.d/samba stop

         sleep 2

         PID=`pidof nmbd`
         if [ "$PID" == "" ]; then
                 echo stop was enough <<<------- never happens
         else
                 echo killing nmbd
                 killall -9 nmbd
                 sleep 2
         fi

         /etc/init.d/samba start

         echo `date` samba was restarted >> /etc/samba/restart.log
fi

Has anyone else seen something like this happen?


Gerardo.-


More information about the samba mailing list