Page 1 of 1

Unable to start nrpe

Posted: Fri Sep 04, 2020 1:45 am
by Pratapa
Hi,

We are unable to start nrpe on a client machine which is a Linux server.

[root@host1]# 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 Fri 2020-09-04 16:13:14 AEST; 17min ago
Docs: http://www.nagios.org/documentation
Process: 112921 ExecStopPost=/bin/rm -f /var/run/nrpe/nrpe.pid (code=exited, status=0/SUCCESS)
Process: 112919 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_SSL_OPT (code=exited, status=2)
Main PID: 112919 (code=exited, status=2)

Sep 04 16:13:14 aeadwmappeai33 systemd[1]: Started Nagios Remote Program Executor.
Sep 04 16:13:14 aeadwmappeai33 nrpe[112919]: Unable to open config file '/etc/nagios/nrpe_local.cfg' for reading
Sep 04 16:13:14 aeadwmappeai33 nrpe[112919]: Continuing with errors...
Sep 04 16:13:14 aeadwmappeai33 nrpe[112919]: Could not open config directory '/etc/nagios/nrpe.d' for reading.
Sep 04 16:13:14 aeadwmappeai33 nrpe[112919]: Continuing with errors...
Sep 04 16:13:14 aeadwmappeai33 systemd[1]: nrpe.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 04 16:13:14 aeadwmappeai33 systemd[1]: Unit nrpe.service entered failed state.
Sep 04 16:13:14 aeadwmappeai33 systemd[1]: nrpe.service failed.




[root@host1]# uname -a
Linux host1 3.10.0-1127.8.2.el7.x86_64 #1 SMP Thu May 7 19:30:37 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@host1]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 (Maipo)



nrpe.cfg file attached.


Additional information

[root@host1]# cat /etc/nagios/nrpe.cfg|grep nrpe
# from which the check_nrpe client is being executed.
pid_file=/var/run/nagios/nrpe.pid
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
nrpe_user=nagios
nrpe_group=nagios
dont_blame_nrpe=1
# all network sessions are connected. This causes the nrpe daemons to
# command arguments *AND* the dont_blame_nrpe directive in this
include=/etc/nagios/nrpe_local.cfg
# you can place your config snipplets into nrpe.d/
include_dir=/etc/nagios/nrpe.d/

Re: Unable to start nrpe

Posted: Mon Sep 07, 2020 7:39 am
by ixi
Unable to open config file '/etc/nagios/nrpe_local.cfg' for reading
Could not open config directory '/etc/nagios/nrpe.d' for reading
Probably a problem of right on the files and/or directories. To check this side there to begin ;)

Re: Unable to start nrpe

Posted: Wed Sep 09, 2020 1:48 am
by Pratapa
Exactly, it is the issue of permissions on the directory.

I fixed it. Thanks.

You may please lock it.