[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Init script fails to start
From: |
Eric Pailleau |
Subject: |
Re: Init script fails to start |
Date: |
Wed, 10 Nov 2010 09:24:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100624 Mandriva/3.0.5-0.1mdv2009.1 (2009.1) Thunderbird/3.0.5 |
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nn_logger
echo $PID > /var/run/nn_logger.pid
Hello,
this the problem.
You are recording the init script pid in /var/lock/subsys/nn_logger ,
but this is not the nn_logger pid.
So as the init script stops after launching nn_logger, this pid doesn't
refer to a valid process. monit try to launch, but the pid is always invalid...
nn_logger must create its own pid file (recommanded),
or you have to do a tip :
echo $PID > /var/run/nn_logger.pid
exec [nn_logger daemon command]
i.e 'exec' is replacing the current init script process by nn_logger one.
nn_logger inherit the init script pid file...
But remember that 'exec' must be the last action of the init script as far
next lines won't be evaluated (the process becomes nn_logger...)
Hope it can help...
Regards.
PS : the log shows that nn_logger is running with pid 5370 while monit expect
it to be 5114 ...