Unable to start nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

Unable to start nrpe

Post 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/
Attachments
nrpe.cfg.txt
(10.71 KiB) Downloaded 340 times
ixi
Posts: 3
Joined: Tue Aug 04, 2020 4:47 am

Re: Unable to start nrpe

Post 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 ;)
[Ubuntu Server 20.04.1 LTS - Apache 2.4.41 + PHP 7.4.3]
Nagios Core 4.4.6 - NDOUtils 2.1.3 - Nagvis 1.9.21 - PNP4Nagios 0.6.26
Pratapa
Posts: 150
Joined: Tue Oct 01, 2019 1:33 am

Re: Unable to start nrpe

Post by Pratapa »

Exactly, it is the issue of permissions on the directory.

I fixed it. Thanks.

You may please lock it.
Locked