Page 1 of 1
Samba not started after reboot
Posted: 09 Dec 2010, 13:21
by Asad
Samba fails to start when issuing reboot from ssh or using the GUI. Have to run "service samba start" or start it from the GUI again.
After reboot:
root@b3:/home/asqu# ps aux | grep smb
root 1831 0.0 0.1 1856 584 pts/0 S+ 19:16 0:00 grep smb
root@b3:/home/asqu# service samba start
Starting Samba daemons: nmbd smbd.
root@b3:/home/asqu# ps aux | grep smb
root 1843 1.5 0.5 16892 2860 ? Ss 19:16 0:00 /usr/sbin/smbd -D
root 1849 0.0 0.2 16892 1252 ? S 19:16 0:00 /usr/sbin/smbd -D
root@b3:/home/asqu# ps aux | grep nmb
root 1050 0.0 0.4 9788 2064 ? Ss 19:14 0:00 /usr/sbin/nmbd -D
root 1859 0.0 0.1 1860 624 pts/0 S+ 19:19 0:00 grep nmb
I have just added the following parameters to smb.conf and added one more share.
wide links=yes
unix extensions=no
Can't see how that is related to the problem.
Re: Samba not started after reboot
Posted: 10 Dec 2010, 03:11
by Ubi
Can't see how that is related to the problem.
well, did you try reverting back to the original version of smb.conf and see if maybe it does relate to the problem instead of just speculating that it is probably unrelated?
did you read the log files?
Re: Samba not started after reboot
Posted: 10 Dec 2010, 05:16
by Asad
there is nothing in the logs, I will try with the original config again.
Re: Samba not started after reboot
Posted: 10 Dec 2010, 08:59
by C.Igar
Is S20samba still listed in /etc/rc2.d ?
Re: Samba not started after reboot
Posted: 11 Dec 2010, 14:24
by Cheeseboy
Hi,
I occasionally had the same problem on the bubba2. Not always, but sometimes.
As I don't use Windows at home, the only reason I noticed this happening was that I saw kernel errors in the logs.
Unfortunately I haven't got those logs any more, so I can't give you an example.
I do recommend installing the logcheck package though. By default it will email you every 10 minutes or something silly like that, which is a pain in the butt, but you can change the behaviour by editing /etc/cron.d/logcheck.
Here is my setup, it will email me twice a day, 07:02 and 19:02, and after reboot:
Code: Select all
# /etc/cron.d/logcheck: crontab entries for the logcheck package
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
2 7,19 * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
# EOF
If you do not have an alias for root set up, change the email address accordingly.
I'm not saying you have the same problem I had, but if you start monitoring your system activity on a daily basis you start noticing things, and it might help.
Cheers,
Cheeseboy
Re: Samba not started after reboot
Posted: 12 Dec 2010, 15:22
by albert
I've got the same problem on my new B3.
In /etc/rc2.d I have S06samba (which is a link to /etc/init.d/samba).
What I noticed is that smbd isn't started properly, it core dumps. Looking at the first lines of /var/log/samba/log.all I see the following:
[2010/12/12 19:54:02.774169, 0] lib/interface.c:542(load_interfaces)
WARNING: no network interfaces found
[2010/12/12 19:54:03.309126, 0] smbd/server.c:659(open_sockets_smbd)
open_sockets_smbd: No sockets available to bind to.
As the file /etc/samba/smb.conf contains the line
interfaces = eth1
It should work. I got the impression that the eth1 interface (LAN) is not properly up yet when samba starts.
After a reboot/start I login and restart samba, and everything works fine.
So it looks like samba is starting a little bit too early.
Re: Samba not started after reboot
Posted: 15 Dec 2010, 08:39
by Asad
It solved my problem when changing interfaces = br0 to eth1.
Perhaps an update should change this setting?
br0 is the wlan interface and eth1 is the LAN interface.
However I still experience slow response and often no response when typing \\192.168.10.1 from a Windows computer even if the services are running. When this happens, only way is to reboot or restart service.
Re: Samba not started after reboot
Posted: 16 Dec 2010, 04:38
by albert
I don't have a B3 with wireless, so the interfaces parameter already points to eth1, and still samba wouldn't start on boot/reboot (but it did when I manually started it: /etc/init.d/samba start)
I fixed it by inserting a "sleep 2" into the /etc/init.d/samba script between where nmbd is started and smbd started. One second didn't cut it, but 2 seconds did. The guys at excito are aware of the issue and hopefully fix it.
My fix is not the prettiest, but it works, after a boot/reboot samba is started fine now.
Albert