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.

Got problems with your B2 or B3? Share and get helped!
Post Reply
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Services do not start right.

Post 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
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Services do not start right.

Post 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
albert
Posts: 69
Joined: 09 Jul 2007, 14:35
Location: The Netherlands

Re: Services do not start right.

Post 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
;;
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Services do not start right.

Post by kurt2000 »

Hi & thanks

That helped with samba, but ipsec is still funny.

i will try mod the script.

wkr.
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Services do not start right.

Post by kurt2000 »

i added a ipsec reload to the /etc/rc.local and that does the job.

Wkr.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Services do not start right.

Post 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.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Services do not start right.

Post by Ubi »

why not add the sleep command to the network script instead of to all the other scripts separately then?
ewr
Posts: 7
Joined: 07 Dec 2010, 11:51

Re: Services do not start right.

Post 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.
Post Reply