Page 1 of 1
Services do not start right.
Posted: 18 Dec 2010, 18:32
by kurt2000
Hi
On the b3 i'm playing with, i have a weird problem i need help investigating.
It seem that som of the services have problems starting. samba dosn't run after bootup, and my ipsec configuration isn't loaded when the b3 is booted. if i login as root and do a /etc/init.d/samba restart and a /etc/init.d/ipsec restart everything runs fine.
I have never seen this kind of problem before, so i'm a little bit in the dark.
how would you investigate this kind of problem ?
Wkr.
Svend
Re: Services do not start right.
Posted: 18 Dec 2010, 19:06
by Cheeseboy
Howdy,
I would start by adding debug output to the startup scripts.
Something like:
echo "/etc/init.d/samba is being executed!" >> /root/debug.log
Then you will at least know if they execute on startup...
Cheers,
Cheeseboy
Re: Services do not start right.
Posted: 19 Dec 2010, 04:53
by albert
The problem with samba I have encountered as well, excito is aware of this and trying to look for a solution.
The (quick-fix) solution I found to be working (for samba) is to add a "sleep 2" between the starting of the nmbd daemon and the smbd daemon in the /etc/init.d/samba script. I get the impression that at startup the networking is not fully stabilized yet.
Here is what I meant:
start)
log_daemon_msg "Starting Samba daemons"
# Make sure we have our PIDDIR, even if it's on a tmpfs
install -o root -g root -m 755 -d $PIDDIR
NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null`
if [ "$NMBD_DISABLED" != 'Yes' ]; then
log_progress_msg "nmbd"
if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/nmbd -- -D
then
log_end_msg 1
exit 1
fi
fi
sleep 2
if [ "$RUN_MODE" != "inetd" ]; then
log_progress_msg "smbd"
if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D; then
log_end_msg 1
exit 1
fi
fi
log_end_msg 0
;;
Re: Services do not start right.
Posted: 19 Dec 2010, 13:41
by kurt2000
Hi & thanks
That helped with samba, but ipsec is still funny.
i will try mod the script.
wkr.
Re: Services do not start right.
Posted: 19 Dec 2010, 14:19
by kurt2000
i added a ipsec reload to the /etc/rc.local and that does the job.
Wkr.
Re: Services do not start right.
Posted: 19 Dec 2010, 17:16
by ryz
Most likely the problem with ipsec is the same as with Samba. For some reason the B3 reports that the network interfaces are up before they relay are and therefore scripts depending on the network to be up fails at boot.
I do not have an B3 but I guess that adding the "sleep 2" to the /etc/init.d/networking might be a better solution so that all services depending of the network will wait until the network is up.
Re: Services do not start right.
Posted: 20 Dec 2010, 02:02
by Ubi
why not add the sleep command to the network script instead of to all the other scripts separately then?
Re: Services do not start right.
Posted: 21 Dec 2010, 15:20
by ewr
I have the same problem with Samba (ipsec I don't use). And yes, I can also start Samba by a simple restart of the service from the command line.
I found out that the smbd crashes during startup and leaves a core dump in /var/log/samba/cores/smbd
(and I know next to nothing about the content of a core dump).
I will add the sleep too and see if it works.