Install NRPE with out Xinetd

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Install NRPE with out Xinetd

Post by bsivavani »

Hi,

We are trying to install NRPE on RHEL 7.3 by following below url

https://support.nagios.com/kb/article/n ... .html#RHEL

while starting the nrpe agent we are seeing below issue

[root@s930l3087 plugins]# systemctl status nrpe.service
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-11-16 16:04:59 CET; 7s ago
Docs: http://www.nagios.org/documentation
Process: 27706 ExecStopPost=/bin/rm -f /usr/local/nagios/var/nrpe.pid (code=exited, status=0/SUCCESS)
Process: 27704 ExecStart=/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f (code=exited, status=2)
Main PID: 27704 (code=exited, status=2)

Nov 16 16:04:59 s930l3087 systemd[1]: Started Nagios Remote Plugin Executor.
Nov 16 16:04:59 s930l3087 systemd[1]: Starting Nagios Remote Plugin Executor...
Nov 16 16:04:59 s930l3087 systemd[1]: nrpe.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 16 16:04:59 s930l3087 systemd[1]: Unit nrpe.service entered failed state.
Nov 16 16:04:59 s930l3087 systemd[1]: nrpe.service failed.
[root@s930l3087 plugins]#

Kindly advice ?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Install NRPE with out Xinetd

Post by npolovenko »

Hello, @bsivavani. Do you see any recent errors in /var/log/messages? Can you also upload /usr/local/nagios/etc/nrpe.cfg file?
Also, please make sure that you ran the firewall related commands from the tutorial:

Code: Select all

firewall-cmd --zone=public --add-port=5666/tcp
firewall-cmd --zone=public --add-port=5666/tcp --permanent
After that please run

Code: Select all

service nrpe start
and

Code: Select all

service nrpe status
Let us know the output of this two commands.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Install NRPE with out Xinetd

Post by bsivavani »

Hi,

I made changes to firewall as suggested, but still the same issue.

I didn't find any errors on /var/log/messages.

Please find attached nrpe.cfg file.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Install NRPE with out Xinetd

Post by lmiltchev »

Do you have nrpe running under xinetd by chance? If NPRE is running under xinetd and you try to start it as a standalone daemon, NRPE won't start, and you will see error messages, similar to this one:
Bind to port 5666 on 0.0.0.0 failed: Address already in use.
Is "/etc/xinetd.d/nrpe" file present on your system? If it is, you can remove it:

Code: Select all

rm -f /etc/xinetd.d/nrpe
and restart xinetd:

Code: Select all

systemctl restart xinetd.service
Next, try restarting nrpe:

Code: Select all

systemctl restart nrpe.service
and check its status:

Code: Select all

systemctl status nrpe.service
Also, disable SELinux (at least temporarily) to see if this is causing the issue.

Code: Select all

setenforce 0
Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked