RHEL 6.3 & NRPE Issues

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
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

RHEL 6.3 & NRPE Issues

Post by 00_kl250 »

All,

I have a RHEL 6.3 server that is registered with red hat. I've installed the nagios plugins(2.0.3) and the nrpe-2.15.

When I run the following command, netstat -at | grep nrpe I get nothing.

When I run the following command, /usr/local/nagios/libexec/check_nrpe -H localhost I get:

connect to address ::1 port 5666: Connection refused
connect to address 127.0.0.1 port 5666: Connection refused
connect to host localhost port 5666: Connection refused

When i do a less /var/log/messages I get the following:

Sep 11 09:06:03 localhost xinetd[46274]: Server /usr/local/nagios/bin/nrpe is not executable [file=/etc/xinetd.d/nrpe] [line=11]
Sep 11 09:06:03 localhost xinetd[46274]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/nrpe] [line=11]
Sep 11 09:06:03 localhost xinetd[46274]: Must specify a server in nrpe
Sep 11 09:06:03 localhost xinetd[46274]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
Sep 11 09:06:03 localhost xinetd[46274]: Started working: 0 available services
Sep 11 09:07:48 localhost xinetd[46274]: Exiting...

When I run a ps -ef |grep xinetd, I get:

root 5107 1 0 09:26 ? 00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 32359 13266 0 09:54 pts/0 00:00:00 grep xinetd

I've restarted the xinetd process multiple times

When I run grep nrpe /etc/services I get:

nrpe 5666/tcp # NRPE

I added port 5666 to the iptables:

*filter
:INPUT ACCEPT [368773:68873995]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [372083:68473830]
-A INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5666 -j ACCEPT
COMMIT
# Completed on Thu Sep 11 09:21:53 2014


My /etc/xinetd.d/nrpe configuration file looks like this:

# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 192.168.0.29
}

I've also tried adding in the 127.0.0.1 in the only_from field and I get the same problem.

I've setup nrpe on a few centos and SUSE servers and have never had this issue. I'm totally stumped at this point. Any help would be much appreciated ;)
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: RHEL 6.3 & NRPE Issues

Post by eloyd »

Is xinetd running?

Code: Select all

chkconfig --list xinetd
You're looking for "3:on"
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: RHEL 6.3 & NRPE Issues

Post by 00_kl250 »

Yes, it looks like it:


chkconfig --list xinetd
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: RHEL 6.3 & NRPE Issues

Post by eloyd »

Okay, that's good. Next, let's make sure stuff is listening. If you have lsof installed, use it:

Code: Select all

lsof -i:5666
If you don't have it installed, install it:

Code: Select all

yum -y install lsof
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: RHEL 6.3 & NRPE Issues

Post by 00_kl250 »

lsof -i:5666, i get nothing.

i ran the install and it says it's already installed.

>yum -y install lsof
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
rhel-6-server-rpms | 3.7 kB 00:00
Setting up Install Process
Package lsof-4.82-4.el6.x86_64 already installed and latest version
Nothing to do
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: RHEL 6.3 & NRPE Issues

Post by eloyd »

You should see something like this:

Code: Select all

[root@svip-d01 ~]# lsof -i:5666
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
xinetd  1567 root    6u  IPv6   9579      0t0  TCP *:nrpe (LISTEN)
If you do not, then xinetd is not properly configured to run NRPE or else xinetd is not started. Try:

Code: Select all

service xinetd start
and then the

Code: Select all

lsof -i:5666
to see if that helps.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: RHEL 6.3 & NRPE Issues

Post by 00_kl250 »

Still no response from lsof -i:5666

service xinetd stop
Stopping xinetd: [ OK ]
[root@ ~]# service xinetd start
Starting xinetd: [ OK ]
[root@ ~]# lsof -i:5666
[root@ ~]#
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: RHEL 6.3 & NRPE Issues

Post by eloyd »

Then something is wrong with xinetd. I have meetings to go to, but may be able to return to this by the end of the day.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
00_kl250
Posts: 63
Joined: Tue Apr 16, 2013 7:26 am

Re: RHEL 6.3 & NRPE Issues

Post by 00_kl250 »

Ok. Thanks for your help!
User avatar
millisa
Posts: 69
Joined: Thu Jan 16, 2014 11:13 pm
Location: Austin, TX
Contact:

Re: RHEL 6.3 & NRPE Issues

Post by millisa »

Code: Select all

Sep 11 09:06:03 localhost xinetd[46274]: Server /usr/local/nagios/bin/nrpe is not executable [file=/etc/xinetd.d/nrpe] [line=11]
Is /usr/local/nagios/bin/nrpe executable?

Code: Select all

ls -l /usr/local/nagios/bin/nrpe
Should look something like this:

Code: Select all

-rwx--x--x 1 root root 54620 Mar 20  2013 /usr/local/nagios/bin/nrpe
(sizes and dates will be different on yours)

Code: Select all

chmod 711 /usr/local/nagios/bin/nrpe
(i'm not sure you really need to give execute to group/world, 700 may work fine)

You may have some config you need to do in /usr/local/nagios/etc/nrpe.cfg too, but I expect it's the not executing issue that's stopping you at the moment.
Locked