Page 1 of 1

CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 12:16 pm
by mdzx111
Hello,

So I followed the instructions to install the CentOS monitoring agent on my machine. I've done this several times now successfully. When I ran the install this time, it appeared to install just fine with no errors. However when I try to connect to it using NagiosXI, I'm getting a successful ping but everything else says connection refused or timed out.

Please help.

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 1:49 pm
by scottwilkerson
This may have not not installed successfully

to test from the Nagios XI machine run

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H <client_machine_IP>
you should see

Code: Select all

NRPE v2.12
If not, back on the client run

Code: Select all

yum -y install autoconf gcc glibc libmcrypt-devel make openssl-devel  perl-Net-SMTP-TLS sudo sysstat xinetd
If this goes without error, re-run the agent installer

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 2:51 pm
by mdzx111
Well Scott, I got to give you an A for effort but no luck. I wasnt able to connect from the NagiosXI box to the client machine 192.168.1.41 running:

cd /usr/local/nagios/libexec
./check_nrpe -H 192.168.1.41

I got the same error as within NagiosXI which is connection refused or timed out. Keep in mind I can ping this machine within NagiosXI.

So I ran:

yum -y install autoconf gcc glibc libmcrypt-devel make openssl-devel perl-Net-SMTP-TLS sudo sysstat xinetd

and it ran fine without any errors, updated whatever it needed to and was happy.

Then I re-ran the install and it ran without errors, but in the end I get the same results.....

Connection refused or timed out.

Please also keep in mind you've helped me on CentOS earlier and because of that I've been able to monitor several other machines. So I somewhat know what I'm doing.

Thank you again for all your hard work. Now what's next?

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 2:59 pm
by scottwilkerson
Ok, on the client lets run

Code: Select all

cd /usr/local/nagios/libexec
./check_nrpe -H localhost
You should get

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.
If so, it is listening, which is good. Then from the XI server site we need to see if we can reach the client

Code: Select all

ping 192.168.1.41
If that goes ok, lets try to telnet to it

Code: Select all

telnet 192.168.1.41 5667

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 3:17 pm
by mdzx111
I have always been able to ping from the XI box to 192.168.1.41 in SSH and in XI.

When I run:
cd /usr/local/nagios/libexec
./check_nrpe -H localhost

I get:


[root@web2 linux-nrpe-agent]# cd /usr/local/nagios/libexec
[root@web2 libexec]# ./check_nrpe -H localhost
CHECK_NRPE: Socket timeout after 10 seconds.
[root@web2 libexec]#


So that's a little different than what you were expecting.

Also I'm not able to get telnet working on from the XI box in putty. Below is what I get:

[root@localhost ~]# ping 192.168.1.41
PING 192.168.1.41 (192.168.1.41) 56(84) bytes of data.
64 bytes from 192.168.1.41: icmp_seq=1 ttl=64 time=0.382 ms
64 bytes from 192.168.1.41: icmp_seq=2 ttl=64 time=0.381 ms
64 bytes from 192.168.1.41: icmp_seq=3 ttl=64 time=0.392 ms
^C
--- 192.168.1.41 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2362ms
rtt min/avg/max/mdev = 0.381/0.385/0.392/0.005 ms
[root@localhost ~]# telent 192.168.1.41 5667
-bash: telent: command not found
[root@localhost ~]# telnet
telnet> 192.168.1.41 5667
?Invalid command
telnet> 192.168.1.41
?Invalid command
telnet> 192.168.1.41 5667
?Invalid command

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 3:32 pm
by mdzx111
Ok sorry but I mistyped TELNET on the XI box in putty.

Here is what happens when I TELNET from XI in putty to 192.168.1.41 5667


[root@localhost ~]# telnet 192.168.1.41 5667
Trying 192.168.1.41...
telnet: connect to address 192.168.1.41: No route to host
[root@localhost ~]#

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 3:35 pm
by scottwilkerson
mdzx111 wrote:When I run:
cd /usr/local/nagios/libexec
./check_nrpe -H localhost

I get:


[root@web2 linux-nrpe-agent]# cd /usr/local/nagios/libexec
[root@web2 libexec]# ./check_nrpe -H localhost
CHECK_NRPE: Socket timeout after 10 seconds.
This looks like nrpe isn't running

Can we restart xinetd

Code: Select all

service xinetd restart
Then try the above command again, if that doesn't work, please send a copy of your /etc/xinetd.d/nrpe and also run the following and report the output

Code: Select all

ls -l /usr/local/nagios/bin/nrpe
Also, I am a little perplexed by your 192.168.1.41: No route to host on the telnet, yet you can ping the host...That's strange

Re: CentOS 5.5 client install problem

Posted: Fri Apr 20, 2012 3:55 pm
by mdzx111
Ok so its all working now. Firewall was running as part of the problem and has been turned off.

This one is close. Now if we can only get other Ubuntu machines going, we'll be all set.

Thank you again!