Bug#297905: [Pkg-nagios-devel] Bug#297905: nagios-text: nagios init script fails to start
Stephane Dudzinski
Stephane Dudzinski <stephane@cp.dias.ie>, 297905@bugs.debian.org
Fri, 04 Mar 2005 15:28:09 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
sean finney wrote:
| could you put a "set -x" in the top of your init script, and send me
| the output of /etc/init.d/nagios start?
Here's a few things i tried :
~ /etc/init.d/nagios restart
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/nagios
+ NAME=nagios
+ DESC=nagios
+ NICENESS=5
+ NAMEDPIPE=/var/run/nagios/nagios.cmd
+ PIDFILE=/var/run/nagios/nagios.pid
+ CONFIG=/etc/nagios/nagios.cfg
+ test -f /usr/sbin/nagios
+ set -e
+ case "$1" in
+ /etc/init.d/nagios stop
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/nagios
+ NAME=nagios
+ DESC=nagios
+ NICENESS=5
+ NAMEDPIPE=/var/run/nagios/nagios.cmd
+ PIDFILE=/var/run/nagios/nagios.pid
+ CONFIG=/etc/nagios/nagios.cfg
+ test -f /usr/sbin/nagios
+ set -e
+ case "$1" in
+ echo -n 'Stopping nagios: '
Stopping nagios: + start-stop-daemon --stop --quiet --pidfile
/var/run/nagios/nagios.pid --oknodo --exec /usr/sbin/nagios
+ echo nagios.
nagios.
+ rm -f /var/run/nagios/nagios.pid
+ rm -f /var/run/nagios/nagios.cmd
+ exit 0
+ sleep 2
+ /etc/init.d/nagios start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/nagios
+ NAME=nagios
+ DESC=nagios
+ NICENESS=5
+ NAMEDPIPE=/var/run/nagios/nagios.cmd
+ PIDFILE=/var/run/nagios/nagios.pid
+ CONFIG=/etc/nagios/nagios.cfg
+ test -f /usr/sbin/nagios
+ set -e
+ case "$1" in
+ echo -n 'Starting nagios: '
Starting nagios: + check_started
+ '[' -f /etc/nagios/check_nagios_db ']'
+ '[' -f /usr/lib/nagios/plugins/check_nagios ']'
+ /usr/lib/nagios/plugins/check_nagios -e 15 -F
/var/log/nagios/status.log -C nagios
+ return 0
+ echo 'already running'
already running
+ exit 0
+ exit 0
~ ps aux |grep nagios
nagios 12354 0.0 0.1 2204 1120 ? SNs Mar03 0:12
/usr/sbin/nagios /etc/nagios/nagios.cfg
kill -9 12354
~ /etc/init.d/nagios start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/nagios
+ NAME=nagios
+ DESC=nagios
+ NICENESS=5
+ NAMEDPIPE=/var/run/nagios/nagios.cmd
+ PIDFILE=/var/run/nagios/nagios.pid
+ CONFIG=/etc/nagios/nagios.cfg
+ test -f /usr/sbin/nagios
+ set -e
+ case "$1" in
+ echo -n 'Starting nagios: '
Starting nagios: + check_started
+ '[' -f /etc/nagios/check_nagios_db ']'
+ '[' -f /usr/lib/nagios/plugins/check_nagios ']'
+ /usr/lib/nagios/plugins/check_nagios -e 15 -F
/var/log/nagios/status.log -C nagios
+ return 0
+ echo 'already running'
already running
~ /usr/lib/nagios/plugins/check_nagios -e 15 -F
/var/log/nagios/status.log -C nagios
Could not locate a running Nagios process!
/usr/sbin/nagios /etc/nagios/nagios.cfg &
~ Nagios 1.3 starting... (PID=20508)
Error: Could not create external command file
'/var/log/nagios/rw/nagios.cmd' as named pipe: (17) -> File exists. If
this file already exists and you are sure that another copy of Nagios is
not running, you should delete this file.
Bailing out due to errors encountered while trying to open the external
command file for reading... (PID=20508)
rm /var/log/nagios/rw/nagios.cmd
~ /etc/init.d/nagios start
Starting nagios: already running
~ /usr/sbin/nagios /etc/nagios/nagios.cfg&
[1] 20701
Nagios 1.3
Copyright (c) 1999-2004 Ethan Galstad (nagios@nagios.org)
Last Modified: 10-24-2004
License: GPL
Nagios 1.3 starting... (PID=20701)
Steph
- --
Stephane Dudzinski - IT Manager
DIAS - http://www.dias.ie
This mail was sent using Debian GNU/Linux
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCKH6JxCVslAry32ARAih9AKCXZ/JC8sX41s2jnNxD0SoOIiMvfQCfd7hr
7obOHnykBRqPlPTdDboTEvQ=
=L0lN
-----END PGP SIGNATURE-----