monit utility failed to start nscd daemon.

beparas

New Member
Joined
Dec 20, 2022
Messages
2
Reaction score
0
Credits
19
Hi All,

From the monit.log file, I observed that monit utility failed to start nscd daemon.

The log in the, **/var/log/monit.log** file,

[ Dec 19 13:43:13] error : 'nscd' process is not running
[ Dec 19 13:43:13] info : 'nscd' trying to restart
[ Dec 19 13:43:13] info : 'nscd' start: /bin/sh
[ Dec 19 13:43:43] error : 'nscd' failed to start


nscd check file present at **/etc/monit.d/check-nscd** path and it contains,

check process nscd with pidfile /var/run/nscd/nscd.pid
start program = "/bin/sh -c '
/etc/init.d/nscd start'
"
stop program = "/bin/sh -c '
/etc/init.d/nscd stop'"

if 3 restarts within 5 cycles then exec /root/shutdown.sh -m


The **/etc/init.d/nscd** file,
#!/bin/sh
#
# nscd interface. it uses /etc/nscd.conf by default
#

mkdir /var/db
mkdir /var/db/nscd

start() {
echo "Starting nscd..."
nscd
}

stop() {
echo -n "Stopping nscd..."
killall nscd
}
restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?


If I run following command on the terminal, nscd process start running,

/etc/init.d/nscd start



Why does monit fail to restart nscd?

How do I debug this?
 



Members online


Top