Samba service hanging on start

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
sounddoc
Posts: 6
Joined: 2009/08/05 14:53:50

Samba service hanging on start

Post by sounddoc » 2009/08/05 15:34:56

Hi all,

This is pretty much an out of the box installation of CentOS standalone server 4.7. I added a few configuration changes (added a share) to my smb.conf file and went to restart samba. `service smb restart` gave me two failures stopping smbd and nmbd - ok, fair enough, they weren't running - but then it hangs on "Starting SMB Services". in /var/log/samba/smbd.log i have the following and nothing else (expect repeated for each subsequent try)

[2009/08/05 10:09:15, 0] smbd/server.c:main(948)
smbd version 3.0.28-0.el4.9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2007

After Ctrl-C'ing from the hang, neither smbd or nmbd are running.

If I hand start smbd& and nmbd& then they both run, but smbstatus gives me the following output:

sessionid.tdb not initialised
/var/cache/samba/connections.tdb not initialised
This is normal if an SMB client has never connected to your server.
Failed to open byte range locking database /var/cache/samba/brlock.tdb
ERROR: Failed to initialise locking database
Can't initialise locking module - exiting

Backing out all the changes in smb.conf and using the generic file has no effect on the outcome.

uname -a:
Linux 2.6.9-78.ELsmp #1 SMP Fri Jul 25 00:04:28 EDT 2008 i686 i686 i386 GNU/Linux

Any ideas?

thanks!

-p

sounddoc
Posts: 6
Joined: 2009/08/05 14:53:50

Re: Samba service hanging on start

Post by sounddoc » 2009/08/06 13:46:28

This is fixed now - I'm not sure if this was the fix, but after doing an strace on smbtrace I saw that it was looking for some lock files in /var/cache/samba (there are a couple other threads on this around the interwebs). None of the solutions worked for me, so I did an strace on smbd, I found it hanging at the following:

send(4, "POST / HTTP/1.1\r\n", 17, 0) = 17
send(4, "Content-Length: 129\r\n", 21, 0) = 21
send(4, "Content-Type: application/ipp\r\n", 31, 0) = 31
send(4, "Host: localhost\r\n", 17, 0) = 17
send(4, "\r\n", 2, 0) = 2
time(NULL) = 1249565417
send(4, "\1\1@\2\0\0\0\1", 8, 0) = 8
time(NULL) = 1249565417
send(4, "\1G\0\22attributes-charset\0\5utf-8", 29, 0) = 29
time(NULL) = 1249565417
send(4, "H\0\33attributes-natural-language\0\5"..., 37, 0) = 37
time(NULL) = 1249565417
send(4, "B\0\24requested-attributes\0\fprinter"..., 54, 0) = 54
time(NULL) = 1249565417
send(4, "\3", 1, 0) = 1
recv(4,

So, not sharing any printers or whatnot, I decided to try and see if starting cups might expose more of the issue as there are cups related entries in smb.conf. cups started fine, so I stopped it. After that, an strace on smbd produced far more output, and brought me back to the command prompt. killed it, and now `service smb start` starts samba and nmbd with no problems at all. Hope this helps someone in the future - reply if it does!

-p

Post Reply

Return to “CentOS 4 - Server Support”