Page 1 of 1

nrpe not getting started on Linux machine

Posted: Tue Feb 18, 2020 5:57 am
by Pratapa
Hi,

nrpe is not getting started on one of the client machine which is a Linux server.

Getting following error.

[root@host1 nagios]# service nrpe status
Redirecting to /bin/systemctl status nrpe.service
● nrpe.service - Nagios Remote Program Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-02-18 21:51:04 AEDT; 4s ago
Docs: http://www.nagios.org/documentation
Process: 75976 ExecStopPost=/bin/rm -f /var/run/nrpe/nrpe.pid (code=exited, status=0/SUCCESS)
Process: 75974 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_SSL_OPT (code=exited, status=1/FAILURE)
Main PID: 75974 (code=exited, status=1/FAILURE)

Feb 18 21:51:04 host1 systemd[1]: Started Nagios Remote Program Executor.
Feb 18 21:51:04 host1 systemd[1]: Starting Nagios Remote Program Executor...
Feb 18 21:51:04 host1 nrpe[75974]: Starting up daemon
Feb 18 21:51:04 host1 nrpe[75974]: Warning: Could not set effective GID=992
Feb 18 21:51:04 host1 nrpe[75974]: Warning: Unable to change supplementary groups using initgroups()
Feb 18 21:51:04 host1 nrpe[75974]: Warning: Could not set effective UID=995
Feb 18 21:51:04 host1 systemd[1]: nrpe.service: main process exited, code=exited, status=1/FAILURE
Feb 18 21:51:04 host1 systemd[1]: Unit nrpe.service entered failed state.
Feb 18 21:51:04 host1 systemd[1]: nrpe.service failed.
[root@host1 nagios]#



[root@host1 nagios]# ps -ef|grep nrpe
nagios 64358 1 0 21:18 ? 00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 76044 57255 0 21:51 pts/0 00:00:00 grep --color=auto nrpe


[root@host1 nagios]# cat /etc/nagios/nrpe.cfg|grep pid
#pid_file=/var/run/nagios/nrpe.pid
pid_file=/var/run/nrpe/nrpe.pid


[root@host1 nagios]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)


[root@nagios libexec]# ./check_nrpe -H host1
NRPE v3.2.1

But checks are happening in Nagios GUI.

What could be the problem?

Re: nrpe not getting started on Linux machine

Posted: Tue Feb 18, 2020 5:59 am
by Pratapa
[root@host1 nagios]# ps -ef|grep nrpe
nagios 64358 1 0 21:18 ? 00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 76044 57255 0 21:51 pts/0 00:00:00 grep --color=auto nrpe

We killed and restarted nrpe but to no avail.

Re: nrpe not getting started on Linux machine

Posted: Tue Feb 18, 2020 1:35 pm
by scottwilkerson
Pratapa wrote:

Code: Select all

nagios 64358 1 0 21:18 ? 00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
this looks like it is started

Can you show the output of

Code: Select all

netstat -nlp|grep 5666

Re: nrpe not getting started on Linux machine

Posted: Wed Feb 19, 2020 3:43 am
by Pratapa
[root@host1~]# netstat -nlp|grep 5666
tcp 0 0 10.210.30.180:5666 0.0.0.0:* LISTEN 64358/nrpe

Re: nrpe not getting started on Linux machine

Posted: Wed Feb 19, 2020 4:41 am
by Pratapa
We have killed the PID 64358 and started nrpe

#kill 64358
#service nrpe start

This is resolved. You may lock the thread.

Re: nrpe not getting started on Linux machine

Posted: Wed Feb 19, 2020 7:18 am
by scottwilkerson
Pratapa wrote:We have killed the PID 64358 and started nrpe

#kill 64358
#service nrpe start

This is resolved. You may lock the thread.
Great!

Locking thread