Nagios check nrpe error could not complete ssl handshake

When you are tying to connect remote host from nagios server using check_nrpe you may get following error.

$ /usr/lib/nagios/plugins/check_nrpe -H remotehostIP

Output:

check_nrpe error could not complete ssl handshake 

Reason for this error is remote host not allowing the nagios server to run command using check_nrpe.

To overcome this problem we need to add ip address of nagios server in remote machine.

Open /etc/nagios/nrpe.cfg using any editor. Then search for allwoed_hosts.

By default allowed host value is allowed_hosts=127.0.0.1

Change 127.0.0.1 to nagios server ip address.

Let’s say if my nagios server ip address 192.168.1.20, you should add as below

allowed_hosts=192.168.1.20

Now restart nagios-nrpe-server in remote host.

$ service nagios-nrpe-server restart

Restart nagios3 and nagios-nrpe-server in nagios server.

$ service nagios3 restart

$ service nagios-nrpe-server restart

Now if you run following command in nagios server, your will get nrpe version details.

$ /usr/lib/nagios/plugins/check_nrpe -H remotehostIP

Output:

NRPE V2.12

-Sany

Advertisements

24 comments on “Nagios check nrpe error could not complete ssl handshake

  1. hello, thx for the tutorial. Im getting the same error but for me, im connecting locally, so there is no need to change the localhost. unfortunately, im getting the same error. Any advice?

    • Thanks for the information. I am having an issue where I am getting a ssl handshake error. I have configured nrpe.cfg and /etc/xinetd.d/nrpe to allow for local host and the server ip address. When I run ” /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1″ it still gives a ssl handshake error. I see the port is bound on the host and can telnet to the port but I cannot get check_nrpe to work properly.

  2. hello, i faced the same problem: after following all the steps required I am blocked at the check_nrpe error – could not complete ssl handshake

    I really don’t know how to check the ssl certificate. the nagios server IP was added to the allowed_host_list . but still the problem persists. Please help

  3. Below is the link I followed to install nrpe:http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf

    Below is the result of /var/log/messages.
    I lso executed the check_nrpe command for tesdting at the end: u’ll see the results.
    Dec 3 11:55:45 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:55:50 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:55:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:55:56 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:56:06 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:56:20 localhost nagios: Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:56:20 localhost nagios: SERVICE ALERT: localhost;SSH;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 11:56:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:56:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:56:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:56:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:56:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:57:00 localhost nagios: Warning: Return code of 127 for check of service ‘Swap Usage’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:57:00 localhost nagios: SERVICE ALERT: localhost;Swap Usage;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 11:57:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:57:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:57:40 localhost nagios: SERVICE ALERT: localhost;Total Processes;WARNING;HARD;1;PROCS WARNING: 374 processes with STATE = RSZDT
    Dec 3 11:57:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:57:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:57:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:57:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:58:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:58:20 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:58:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:58:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:58:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:58:50 localhost nagios: Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:58:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:58:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:59:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:59:30 localhost nagios: Warning: Return code of 127 for check of service ‘HTTP’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 11:59:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:59:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:59:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 11:59:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 11:59:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:00:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:00:10 localhost nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:00:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:00:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:00:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:00:50 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:00:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:00:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:01:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:01:20 localhost nagios: Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:01:20 localhost nagios: SERVICE ALERT: localhost;SSH;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:01:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:01:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:01:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:01:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:01:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:02:00 localhost nagios: Warning: Return code of 127 for check of service ‘Swap Usage’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:02:00 localhost nagios: SERVICE ALERT: localhost;Swap Usage;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:02:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:02:28 localhost nrpe[2089]: Host 127.0.0.1 is not allowed to talk to us!
    Dec 3 12:02:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:02:40 localhost nagios: SERVICE ALERT: localhost;Total Processes;WARNING;HARD;1;PROCS WARNING: 375 processes with STATE = RSZDT
    Dec 3 12:02:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:02:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:02:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:02:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:03:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:03:20 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:03:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:03:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:03:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:03:50 localhost nagios: Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:03:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:03:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:04:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:04:30 localhost nagios: Warning: Return code of 127 for check of service ‘HTTP’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:04:33 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:04:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:04:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:04:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:04:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:05:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:05:10 localhost nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:05:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:05:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:05:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:05:50 localhost nagios: Auto-save of retention data completed successfully.
    Dec 3 12:05:50 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:05:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:05:55 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:06:05 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:54141
    Dec 3 12:06:20 localhost nagios: Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:06:20 localhost nagios: SERVICE ALERT: localhost;SSH;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:06:32 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:06:32 localhost snmpd[13990]: Received SNMP packet(s) from UDP: [41.74.167.245]:55590
    Dec 3 12:06:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:06:43 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:06:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:06:52 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:06:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:07:00 localhost nagios: Warning: Return code of 127 for check of service ‘Swap Usage’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:07:00 localhost nagios: SERVICE ALERT: localhost;Swap Usage;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:07:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:07:24 localhost last message repeated 2 times
    Dec 3 12:07:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:07:40 localhost nagios: SERVICE ALERT: localhost;Total Processes;WARNING;HARD;1;PROCS WARNING: 375 processes with STATE = RSZDT
    Dec 3 12:07:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:07:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:08:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:08:13 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:08:20 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:08:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:08:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:08:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:08:50 localhost nagios: Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:08:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:09:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:09:23 localhost last message repeated 2 times
    Dec 3 12:09:30 localhost nagios: Warning: Return code of 127 for check of service ‘HTTP’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:09:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:09:54 localhost last message repeated 2 times
    Dec 3 12:10:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:10:10 localhost nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:10:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:10:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:10:34 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:10:44 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:10:50 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:10:54 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:11:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:11:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:11:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:11:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:11:20 localhost nagios: Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:11:20 localhost nagios: SERVICE ALERT: localhost;SSH;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:11:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:11:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:12:00 localhost nagios: Warning: Return code of 127 for check of service ‘Swap Usage’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:12:00 localhost nagios: SERVICE ALERT: localhost;Swap Usage;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:12:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:12:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:12:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:12:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:12:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:12:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:12:40 localhost nagios: SERVICE ALERT: localhost;Total Processes;WARNING;HARD;1;PROCS WARNING: 376 processes with STATE = RSZDT
    Dec 3 12:13:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:13:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:13:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:13:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:13:20 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:13:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:13:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:13:50 localhost nagios: Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:14:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:14:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:14:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:14:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:14:23 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:14:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:14:30 localhost nagios: Warning: Return code of 127 for check of service ‘HTTP’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:15:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:15:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:15:10 localhost nagios: Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:15:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:15:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:15:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:15:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:15:50 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:16:03 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:16:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:16:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:16:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:16:20 localhost nagios: Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:16:20 localhost nagios: SERVICE ALERT: localhost;SSH;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:16:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:16:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:17:00 localhost nagios: Warning: Return code of 127 for check of service ‘Swap Usage’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:17:00 localhost nagios: SERVICE ALERT: localhost;Swap Usage;CRITICAL;HARD;1;(Return code of 127 is out of bounds – plugin may be missing)
    Dec 3 12:17:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:17:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:17:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:17:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:17:17 localhost nrpe[2321]: Host 127.0.0.1 is not allowed to talk to us!
    Dec 3 12:17:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:17:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:17:40 localhost nagios: SERVICE ALERT: localhost;Total Processes;WARNING;HARD;1;PROCS WARNING: 375 processes with STATE = RSZDT
    Dec 3 12:18:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:18:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:18:07 localhost nrpe[2335]: Host 127.0.0.1 is not allowed to talk to us!
    Dec 3 12:18:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:18:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:18:20 localhost nagios: Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:18:24 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:18:25 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:18:50 localhost nagios: Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
    Dec 3 12:19:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:19:04 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:19:14 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:55590
    Dec 3 12:19:15 localhost snmpd[13990]: Connection from UDP: [41.74.167.245]:61525
    Dec 3 12:19:17 localhost nrpe[2355]: Host 127.0.0.1 is not allowed to talk to us!
    [root@localhost etc]# yum –enablerepo=dag -y install nagios-nrpe nagios-plugins-nrpe
    Loaded plugins: fastestmirror, priorities, security

    Error getting repository data for dag, repository not found
    [root@localhost etc]# vim /etc/xinetd.d/nrpe
    [root@localhost etc]# /etc/rc.d/init.d/xinetd start
    Starting xinetd:
    [root@localhost etc]# /etc/rc.d/init.d/xinetd restart
    Stopping xinetd: [ OK ]
    Starting xinetd: [ OK ]
    [root@localhost etc]# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1
    CHECK_NRPE: Error – Could not complete SSL handshake.

    is it having sence?

    • In /etc/xinetd.d/nrpe file add following line and test
      only_from=127.0.0.1 192.168.2.20
      where 192.168.2.20 is machine ip where you installed nagios.
      Then restart nagios and nrpe.
      Let me the os name you are using and its version.

      In the log you sent I found error message as “Error getting repository data for dag, repository not found”. Just check your installation once.

  4. Ok the os is centos 6.
    the /etc/xinetd.d/nrpe is already configured as you recommended as below:
    service nrpe
    {
    flags = REUSE
    #type = UNLISTED
    port = 5666
    socket_type = stream
    wait = no
    user = nagios
    group = nagios
    server = /usr/sbin/nrpe
    server_args = -c /etc/nagios/nrpe.cfg –inetd
    log_on_failure += USERID
    disable = no
    only_from = 127.0.0.1 10.8.10.26
    }
    I think The installation is ok I installed the following packages:
    nagios-plugins-1.4.6
    xinetd
    nrpee-2.8
    and I think i did it correctly since i used the official doc from nagios:
    http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf.

    Nothing is improving.
    thx

  5. this is the result I got after removing the 127.0.0.1:
    [root@localhost etc]# vim /etc/xinetd.d/nrpe
    CHECK_NRPE: Error – Could not complete SSL handshake.
    [root@localhost etc]# /usr/local/nagios/libexec/check_nrpe -H 10.8.10.26
    CHECK_NRPE: Socket timeout after 10 seconds.
    [root@localhost etc]#

  6. I’ve experienced this on CentOS/RHEL where SELinux was set to Enforcing. You can quickly check if this is the case by executing:

    # setenforce 0
    # service nrpe restart

    and then run the check_nrpe command again. If this works, it’s SELinux that’s blocking NRPE commands. You can create a policy, or simple leave SELinux in permissive mode (change /etc/sysconfig/selinux).

  7. after trying every possiblw way…i down graded to
    nagios 3.2.0
    nagios-plugins-1.4.16
    nrpe-2.12
    and it worked….!!

  8. i have similar problem.
    i migrated nagios from old server to new one.
    i copied same config files from old one to new server. just changed paths alone on config files.
    UI is working. getting regular updates.

    but for some hosts they have CHECK_NRPE: Error – Could not complete SSL handshake.

    if i add new server ip on clients nrpe.cfg file. then it works.
    i have more than 100 hosts. I cant change all clients. Is there any way to change on server it self.
    i edited xinet.d file also
    ubuntu@ip:~$ grep nrpe /etc/xinetd.d/nrpe
    service nrpe
    server = /usr/local/nagios/bin/nrpe
    server_args = -c /usr/local/nagios/etc/nrpe.cfg –inetd

    what should i do?

    • My system
      uname -a
      Linux ip-10-0-10-149 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  9. Hi all,

    I have being struggling with this as well on redhat linux 5.1 server., I have tried everything on this site and other site, but I still get
    “CHECK_NRPE: Error – Could not complete SSL handshake”

    when I run commands from nagios server I see on var/log/messages on the monitored host “execv( /etc/xinetd.d/nrpe ) failed: Exec format error (errno = 8)”.
    I

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s