Page 1 of 2
nrpe error
Posted: Tue Jun 05, 2012 2:02 pm
by benhank
I just set up the linux nrpe clint and wizard on my server. Problem is I am getting the following error:
CHECK_NRPE: Error receiving data from daemon.
Re: nrpe error
Posted: Tue Jun 05, 2012 3:59 pm
by scottwilkerson
How did you install NRPE, there are multiple ways.
Did you follow the Linux agent guide,
http://library.nagios.com/library/produ ... inux-agent
or use another method?
Re: nrpe error
Posted: Wed Jun 06, 2012 12:50 pm
by benhank
yes, I used that guide. I also copied and pasted the text into putty. How would I uninstall the agent and try again?
Re: nrpe error
Posted: Wed Jun 06, 2012 2:10 pm
by lmiltchev
You don't need to uninstall the agent - you can just reinstall it. Before you do this, see if you have xinetd installed:
After you make sure it's installed, reinstall the linux agent following our documentation. Watch out for errors during the install process. Enter the Nagios server IP address towards the end of the installation process (when asked). Then test nrpe to make sure it works on the client site:
(Modify this if your plugins directory is in a different location)
You should see:
Note: You may have to add your local host to the "only_from" line in the "/etc/xinetd.d/nrpe":
Things to watch for - iptables, port 5666.
Hope this helps.
Re: nrpe error
Posted: Wed Jun 06, 2012 4:37 pm
by benhank
the arror i get after doing
is:
could not complete ssl handshake
Code: Select all
# 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 = k172.22.3.17
}
Here is what my nrpe cfg looks like:
Re: nrpe error
Posted: Thu Jun 07, 2012 9:56 am
by lmiltchev
You have:
You should probably have:
Are you using xinetd? Can you run the following command?
Either way, you should have also "127.0.0.1" in the "only_from" line, so that you can run NRPE against the localhost. Also, dont forget to restart the daemon if you make any changes:
Re: nrpe error
Posted: Thu Jun 07, 2012 11:41 am
by benhank
Scott what did you mean by this:
Things to watch for - iptables, port 5666.
Hope this helps.
User avatar
lmiltchev
Posts: 906
Joined: Mon May 23, 2011 1:15 pm
Re: nrpe error
Posted: Thu Jun 07, 2012 12:03 pm
by benhank
Now I am getting a "connection refused " error
I set this up with the wizard using SSL encryption , should I be adding a port or something?
this is what i ran on the client machine:
Code: Select all
Now I am getting a "connection refused " error
I set this up with the wizard using SSL encryption , should I be adding a port or something?
[code]login as: root
[email protected]'s password:
Last login: Thu Jun 7 12:07:08 2012 from 172.22.240.3
[root@lkennagiosxi01 ~]# cd /usr/local/nagios/libexec
[root@lkennagiosxi01 libexec]# ./check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
[root@lkennagiosxi01 libexec]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
You have new mail in /var/spool/mail/root
[root@lkennagiosxi01 libexec]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@lkennagiosxi01 libexec]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@lkennagiosxi01 libexec]# cd /usr/local/nagios/libexec
You have new mail in /var/spool/mail/root
[root@lkennagiosxi01 libexec]# ./check_nrpe -H localhost
CHECK_NRPE: Error - Could not complete SSL handshake.
[root@lkennagiosxi01 libexec]#
Re: nrpe error
Posted: Thu Jun 07, 2012 12:12 pm
by lmiltchev
Can you try telnetting to port 5666 from your nagios server?
You can try temporarily disabling the firewall while you are troubleshooting by running in terminal:
Re: nrpe error
Posted: Thu Jun 07, 2012 12:52 pm
by benhank
I ran this on the client server:
Code: Select all
login as: root
[email protected]'s password:
Last login: Thu Jun 7 13:39:47 2012 from 172.22.240.8
[root@lkennagiosxi01 ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
[root@lkennagiosxi01 ~]#
From the monitoring server:
Code: Select all
login as: root
[email protected]'s password:
Last login: Thu Jun 7 12:26:57 2012 from 172.22.240.3
[root@lkennagiosxi01 ~]# telnet 172.22.2.123 5666
Trying 172.22.2.123...
Connected to 172.22.2.123 (172.22.2.123).
Escape character is '^]'.
Connection closed by foreign host.
[root@lkennagiosxi01 ~]# telnet 172.22.2.123 5666
Trying 172.22.2.123...
Connected to 172.22.2.123 (172.22.2.123).
Escape character is '^]'.
Connection closed by foreign host.
You have new mail in /var/spool/mail/root
[root@lkennagiosxi01 ~]#
No good