Page 1 of 1

Nrpe Failed to Restart

Posted: Fri Mar 11, 2016 5:25 am
by rlinux57
root@vps [/usr/lib64/nagios/plugins]# ll /var/run/nrpe/nrpe.pid
-rw-r--r-- 1 root root 6 2016-03-11 05:16 /var/run/nrpe/nrpe.pid

Code: Select all

root@vps [/usr/lib64/nagios/plugins]# service nrpe restart
Shutting down nrpe:                                        [FAILED]
Starting nrpe:                                             [  OK  ]

Code: Select all

root@vps [/usr/lib64/nagios/plugins]# netstat -nlp | grep 5666
tcp        0      0 :::5666                     :::*                        LISTEN      28619/xinetd 
I have attached nrpe file i.e /etc/init.d/nrpe

"/var/lock/subsys/nrpe" is an empty file.

Code: Select all

root@vps [/usr/lib64/nagios/plugins]# ll /var/lock/subsys/nrpe
-rw-r--r-- 1 root root 0 2016-03-11 05:07 /var/lock/subsys/nrpe

Re: Nrpe Failed to Restart

Posted: Fri Mar 11, 2016 10:26 am
by hsmith
It looks like NRPE is already running through the xinetd daemon.

What's the output of this command?

Code: Select all

ls /etc/xinetd.d/

Re: Nrpe Failed to Restart

Posted: Fri Mar 11, 2016 10:31 am
by rkennedy

Code: Select all

root@vps [/usr/lib64/nagios/plugins]# netstat -nlp | grep 5666
tcp        0      0 :::5666                     :::*                        LISTEN      28619/xinetd
The above shows that :5666 is being used by xinetd, and not the stand alone NRPE. You can find the configuration for XINETD + NRPE at /etc/xinetd.d/nrpe. This file will also reference an additional NRPE configuration file, similar to this -

Code: Select all

        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
You'll want to use service xinetd restart upon making changes to your NRPE configuration.

Let us know if that works.