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
Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
Services do not start right.
Re: Services do not start right.
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
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.
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
;;
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.
Hi & thanks
That helped with samba, but ipsec is still funny.
i will try mod the script.
wkr.
That helped with samba, but ipsec is still funny.
i will try mod the script.
wkr.
Re: Services do not start right.
i added a ipsec reload to the /etc/rc.local and that does the job.
Wkr.
Wkr.
Re: Services do not start right.
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.
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.
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.
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.
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.