Code: Select all
Name : nrpe Relocations: (not relocatable)
Version : 2.13 Vendor: Fedora Project
Release : 1.el6 Build Date: Mon 17 Sep 2012 03:05:00 AM AKDT
Install Date: Wed 12 Dec 2012 01:08:15 PM AKST Build Host: buildvm-28.phx2.fedoraproject.org
Group : Applications/System Source RPM: nrpe-2.13-1.el6.src.rpm
Size : 285184 License: GPLv2
Signature : RSA/8, Fri 21 Sep 2012 11:07:47 AM AKDT, Key ID 3b49df2a0608b895
Packager : Fedora Project
URL : http://www.nagios.org
Summary : Host/service/network monitoring agent for Nagios
# service nrpe start
Starting nrpe: [FAILED]
/var/log/messages:
Dec 17 10:54:40 a nrpe[21922]: Unable to open config file '/etc/nagios/nrpe.cfg' for reading
Dec 17 10:54:40 a nrpe[21922]: Config file '/etc/nagios/nrpe.cfg' contained errors, aborting...
The config file does exist:
# ls -alF /etc/nagios
total 16
drwxr-xr-x. 2 root root 4096 Dec 12 13:08 ./
drwxr-xr-x. 95 root root 4096 Dec 17 10:37 ../
-rw-r--r--. 1 root root 5120 Dec 12 13:08 nrpe.cfg
If I start nrpe manually it starts fine:
# /usr/sbin/nrpe -d -c /etc/nagios/nrpe.cfg
# ps aux | grep nrpe
nrpe 21952 0.0 0.0 40940 1220 ? Ss 11:23 0:00 /usr/sbin/nrpe -d -c /etc/nagios/nrpe.cfg
/var/log/messages:
Dec 17 11:23:58 a nrpe[21952]: Starting up daemon
Dec 17 11:23:58 a nrpe[21952]: Listening for connections on port 5666
Dec 17 11:23:58 a nrpe[21952]: Allowing connections from: a.b.c.edu
if I edit /etc/init.d/nrpe and remove "daemon" from (line 46) "daemon $NrpeBin -c $NrpeCfg -d $NRPE_SSL_OPT" services will start nrpe
# service nrpe start
Starting nrpe:
# ps aux | grep nrpe
nrpe 21982 0.0 0.0 40940 1216 ? Ss 11:30 0:00 /usr/sbin/nrpe -d -c /etc/nagios/nrpe.cfg
However daemon is important to the init.d process as it records the PID.
See http://shahmirj.com/blog/the-initd-script for a quick and simple guide on init.d.
I'm not sure why your binary doesn't play well with the daemon function, but currently the package broken under centos 6 and probably redhat 6.