Page 2 of 7

Re: RHEL 6.3 & NRPE Issues

Posted: Fri Sep 12, 2014 7:03 am
by 00_kl250
Intertsting.

There is no path for /usr/local/nagios/bin/nrpe

the furthest i can go is /usr/local/nagios, there is no bin directory in the nagios folder. I'm guessing xinetd is trying to find the nrpe executble in the bin directory but it's not there?

login as: root
root@ password:
Last login: Thu Sep 11 14:12:30 2014
[root@ ~]# ls -l /usr/local/nagios/bin/nrpe
ls: cannot access /usr/local/nagios/bin/nrpe: No such file or directory
[root@ ~]# ls -la /usr/local/nagios/bin/nrpe
ls: cannot access /usr/local/nagios/bin/nrpe: No such file or directory
[root@ ~]# cd /usr/local/nagios/bin
-bash: cd: /usr/local/nagios/bin: No such file or directory
[root@ ~]# cd /usr/local
[root@ local]# cd nagios
[root@ nagios]# cd bin
-bash: cd: bin: No such file or directory
[root@ nagios]# ls
etc include libexec share
[root@ nagios]#

Re: RHEL 6.3 & NRPE Issues

Posted: Fri Sep 12, 2014 10:56 am
by 00_kl250
This has to be the issue.

On one of my suse servers, in the /usr/local/nagios directory there is a bin folder with nrpe executable in it.

In my RHEL box, there is no bin directory under /usr/local/nagios.

So it would make sense why i'm getting the error:

cannot access /usr/local/nagios/bin/nrpe: No such file or directory

Any idea why there is no /bin directory with nrpe executable? Any clue on how to fix it?

Re: RHEL 6.3 & NRPE Issues

Posted: Fri Sep 12, 2014 11:04 am
by eloyd
I'm too lazy to go back and read all the previous notes.

Did you install from source or package? Either way, reinstall. If it was from source, CHECK every line of output to see if it was an error before moving on.

Re: RHEL 6.3 & NRPE Issues

Posted: Fri Sep 12, 2014 12:55 pm
by millisa
And if you installed from package/rpm/yum, which one did you install?
(my nrpe installed from EPEL ends up in /usr/sbin/nrpe)

Re: RHEL 6.3 & NRPE Issues

Posted: Fri Sep 12, 2014 2:53 pm
by abrist
Installing from source or yum (pretty much all installation methods for rhel/centos) should install nrpe to the default location: /usr/local/nagios/bin. If it is not there, the configure, make, or make install most likely failed. Do as eloyd suggested and reinstall nrpe. Keep a careful eye out for any errors.

EDIT: I missed this:
millisa wrote:And if you installed from package/rpm/yum, which one did you install?
(my nrpe installed from EPEL ends up in /usr/sbin/nrpe)
So you may want to check /usr/bin as well.

Re: RHEL 6.3 & NRPE Issues

Posted: Mon Sep 15, 2014 10:07 am
by 00_kl250
Gents,

I installed by downloading nrpe from http://sourceforge.net/projects/nagios/files/nrpe-2.x/

I do not see nrpe in /usr/bin or /usr/sbin.

I will try and a reinstall today and report back with findings.

Thanks for all the help.

Re: RHEL 6.3 & NRPE Issues

Posted: Mon Sep 15, 2014 10:58 am
by 00_kl250
Ok.

So i did a reinstall. Now I have some other issues.

When I run netstat -at | grep nrpe I get the following:

getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
getnameinfo failed
tcp 0 0 *:nrpe *:* LISTEN

It looks like it's working but i've never seen that "getnameinfo failed" error before.

Then when I run

[root@TDMAURCMESERV32 bin]# /usr/local/nagios/libexec/check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.


Any thoughts?

Re: RHEL 6.3 & NRPE Issues

Posted: Mon Sep 15, 2014 1:11 pm
by sreinhardt
getnameinfo is simply stating that it could not resolve a dns name to an IP. Is your dns server accessible?

Agreed, looks like xinetd is at least starting to listen on that port. Let's see if you compiled without ssl by chance.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H localhost -n

Re: RHEL 6.3 & NRPE Issues

Posted: Mon Sep 15, 2014 1:23 pm
by eloyd
ARGGHHH!!! The suspense is killing me!!! :?:

Re: RHEL 6.3 & NRPE Issues

Posted: Mon Sep 15, 2014 2:35 pm
by 00_kl250
Ok, i'm a bit of a linux noob so please bear with me.

I don't think dns is running because:

[root~]# host -t a google.com
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached


When I jump to my suse box, I get the following:

tdtch-rtd1:~ # host -t a google.com
google.com has address 74.125.228.0
google.com has address 74.125.228.4
google.com has address 74.125.228.7
google.com has address 74.125.228.5
google.com has address 74.125.228.3
google.com has address 74.125.228.2
google.com has address 74.125.228.9
google.com has address 74.125.228.14
google.com has address 74.125.228.1
google.com has address 74.125.228.6
google.com has address 74.125.228.8


So it looks like DNS is not running? Do i just need to edit the /etc/resolv.conf file for an entry of the local server(127.0.0.1 point to local host?)

When I run /usr/local/nagios/libexec/check_nrpe -H localhost -n I get:


[root@ etc]# /usr/local/nagios/libexec/check_nrpe -H localhost -n
CHECK_NRPE: Error receiving data from daemon.

Thanks for the help!