CHECK_NRPE: Error - Could not connect to . Check system logs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

Can you run the following command from the Nagios XI server towards the remote nrpe server and show me the output
[guptaa@cacbigdcapmdw51 ~]$ date; /usr/local/nagios/libexec/check_nrpe -n -H 10.92.34.66
Mon Apr 8 15:42:42 EDT 2019
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).


[guptaa@cacbigdcapmdw51 ~]$ sudo tail -40 /var/log/messages
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Starting Session 267299 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Started Session 267302 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Starting Session 267302 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Started Session 267303 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Starting Session 267303 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Started Session 267304 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Starting Session 267304 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Started Session 267305 of user nagios.
Apr 8 15:42:01 cacbigdcapmdw51 systemd: Starting Session 267305 of user nagios.
Apr 8 15:42:13 cacbigdcapmdw51 ndo2db: Trimming timedevents.
Apr 8 15:42:13 cacbigdcapmdw51 ndo2db: Trimming systemcommands.
Apr 8 15:42:13 cacbigdcapmdw51 ndo2db: Trimming servicechecks.
Apr 8 15:42:13 cacbigdcapmdw51 ndo2db: Trimming hostchecks.
Apr 8 15:42:13 cacbigdcapmdw51 ndo2db: Trimming eventhandlers.
Apr 8 15:42:42 cacbigdcapmdw51 check_nrpe: Remote 10.92.34.66 does not support Version 3 Packets
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267309 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267309 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267306 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267306 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267308 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267308 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267307 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267307 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267310 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267310 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267312 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267312 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267311 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267311 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267313 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267313 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267314 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267314 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Started Session 267315 of user nagios.
Apr 8 15:43:01 cacbigdcapmdw51 systemd: Starting Session 267315 of user nagios.
Apr 8 15:43:18 cacbigdcapmdw51 ndo2db: Trimming timedevents.
Apr 8 15:43:18 cacbigdcapmdw51 ndo2db: Trimming systemcommands.
Apr 8 15:43:18 cacbigdcapmdw51 ndo2db: Trimming servicechecks.
Apr 8 15:43:18 cacbigdcapmdw51 ndo2db: Trimming hostchecks.
Apr 8 15:43:18 cacbigdcapmdw51 ndo2db: Trimming eventhandlers.
What tutorial did you use to install nrpe agent on this remote server?
On very high level, I execute below commands which is derived from https://assets.nagios.com/downloads/nag ... jMQAvD_BwE

Code: Select all

wget https://assets.nagios.com/downloads/nagiosxi/agents/solaris-nrpe-agent.tar.gz
tar -xvzf solaris-nrpe-agent.tar.gz 
cd solaris-nrpe-agent
./fullinstall
Add Nagios Host IP address in nrpe.cfg and restart the agent
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by npolovenko »

@anilgupta, I'm seeing this compatibility error:
Apr 8 15:42:42 cacbigdcapmdw51 check_nrpe: Remote 10.92.34.66 does not support Version 3 Packets
Can you try the following command? Its a combination of no-ssl and compatible -2 packets.
/usr/local/nagios/libexec/check_nrpe -n -2 -H xx.xx.xx.xx
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

Can you try the following command? Its a combination of no-ssl and compatible -2 packets.
[guptaa@cacbigdcapmdw51 ~]$ date; /usr/local/nagios/libexec/check_nrpe -n -2 -H xx.xx.xx.xx
Mon Apr 8 16:38:26 EDT 2019
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).

[guptaa@cacbigdcapmdw51 ~]$ sudo tail -40 /var/log/messages
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Started Session 267885 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Starting Session 267885 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Started Session 267884 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Starting Session 267884 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Started Session 267880 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Starting Session 267880 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Started Session 267886 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Starting Session 267886 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Started Session 267887 of user nagios.
Apr 8 16:37:01 cacbigdcapmdw51 systemd: Starting Session 267887 of user nagios.
Apr 8 16:37:21 cacbigdcapmdw51 ndo2db: Trimming timedevents.
Apr 8 16:37:21 cacbigdcapmdw51 ndo2db: Trimming systemcommands.
Apr 8 16:37:21 cacbigdcapmdw51 ndo2db: Trimming servicechecks.
Apr 8 16:37:21 cacbigdcapmdw51 ndo2db: Trimming hostchecks.
Apr 8 16:37:21 cacbigdcapmdw51 ndo2db: Trimming eventhandlers.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267889 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267889 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267890 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267890 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267893 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267893 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267891 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267891 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267894 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267894 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267888 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267888 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267892 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267892 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267895 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267895 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267897 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267897 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Started Session 267896 of user nagios.
Apr 8 16:38:01 cacbigdcapmdw51 systemd: Starting Session 267896 of user nagios.
Apr 8 16:38:25 cacbigdcapmdw51 ndo2db: Trimming timedevents.
Apr 8 16:38:25 cacbigdcapmdw51 ndo2db: Trimming systemcommands.
Apr 8 16:38:25 cacbigdcapmdw51 ndo2db: Trimming servicechecks.
Apr 8 16:38:25 cacbigdcapmdw51 ndo2db: Trimming hostchecks.
Apr 8 16:38:25 cacbigdcapmdw51 ndo2db: Trimming eventhandlers.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

Its a combination of no-ssl and compatible -2 packets
What kind of incompatibility are we hitting?
Is OS version or Agent version?

Please suggest.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by npolovenko »

@anilgupta, I looked at the list of network interfaces and IP addresses in XI server(from your post on Apr 05, 2019 12:51 pm), and then looked at the latest version of the nrpe.cfg config from the remote Solaris server and couldn't find any of the XI IP addresses listed under allowed_hosts. Can you add 192.168.0.161 and 192.168.122 to allowed_hosts in the nrpe.cfg file and restart the nrpe on the Solaris server?(we're still trying to run check commands without the load balancer). Then try executing the following commands:
/usr/local/nagios/libexec/check_nrpe -n -H 10.92.34.66
/usr/local/nagios/libexec/check_nrpe -2 -H 10.92.34.66
/usr/local/nagios/libexec/check_nrpe -2 -n -H 10.92.34.66
And if nrpe connection fails please look at messages in the syslog on the Solaris server, not on the XI server.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

Hi npolovenko,
Can you add 192.168.0.161 and 192.168.122 to allowed_hosts in the nrpe.cfg file and restart the nrpe on the Solaris server?
Please note that 192.168.0.161 is our Lab Environment.
"192.168.122" can you please share correct IP, which is this IP?

Currently, I am working on Pre-Prod Environment. The Nagios XI has been installed on below server.

Code: Select all

[guptaa@cacbigdcapmdw51 ~]$ hostname -I
10.194.78.206 10.194.78.208 10.195.159.100
[guptaa@cacbigdcapmdw51 ~]$ hostname
cacbigdcapmdw51.mgmt.cihs.gov.on.ca
I have added the hostname "cacbigdcapmdw51.mgmt.cihs.gov.on.ca" in nrpe.cfg which is not working. Additionally, I tried by replacing the hostname with IP address, but error still persists.


Question:
1) Do you need to register my NEW pre-prod server in your system?
2) In last post, you referred incompatibility issue. Can you please explain it what kind of incompatibility are we encountering?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by npolovenko »

@anilgupta, Ok, I see. Can you upload the syslog file from the Solaris server(the path should be /var/log/syslog)?
1) Do you need to register my NEW pre-prod server in your system?
No, your XI license includes a test/preproduction install. NRPE agent doesn't require any verification.
https://support.nagios.com/kb/article.php?id=145
In last post, you referred incompatibility issue. Can you please explain it what kind of incompatibility are we encountering?
Your version of the NRPE agent is old and it doesn't support version 3 packets used by default in the latest XI. However, adding -2 to the command usually takes care of the issue.

Did you restart the nrpe on Solaris server after adding a new host to the nrpe.cfg file? What command did you use?

Please show us the contents of this config file:
cat /etc/inetd.conf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

Did you restart the nrpe on Solaris server after adding a new host to the nrpe.cfg file? What command did you use?
Yes, we restarted the NRPE. Since NRPE is not registered as service, we killed the process and started it as

Code: Select all

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Please show us the contents of this config file:

Code: Select all

bash-3.2# uname -a
SunOS csbtipdcapmdw07 5.10 Generic_150400-63 sun4v sparc sun4v
bash-3.2# cat /etc/inetd.conf
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)inetd.conf 1.56    04/10/21 SMI"
#
# Legacy configuration file for inetd(1M).  See inetd.conf(4).
#
# This file is no longer directly used to configure inetd.
# The Solaris services which were formerly configured using this file
# are now configured in the Service Management Facility (see smf(5))
# using inetadm(1M).
#
# Any records remaining in this file after installation or upgrade,
# or later created by installing additional software, must be converted
# to smf(5) services and imported into the smf repository using
# inetconv(1M), otherwise the service will not be available.  Once
# a service has been converted using inetconv, further changes made to
# its entry here are not reflected in the service.
#
#
# CacheFS daemon.  Provided only as a basis for conversion by inetconv(1M).
#
100235/1 tli rpc/ticotsord wait root /usr/lib/fs/cachefs/cachefsd cachefsd
bpcd    stream  tcp     nowait  root    /usr/openv/netbackup/bin/bpcd bpcd
vnetd   stream  tcp     nowait  root    /usr/openv/bin/vnetd vnetd
vopied  stream  tcp     nowait  root    /usr/openv/bin/vopied vopied
bpjava-msvc     stream  tcp     nowait  root    /usr/openv/netbackup/bin/bpjava-msvc bpjava-msvc -transient
bash-3.2# 
/var/log/syslog is of ZERO size, however I could see some error message in /var/adm/messages.

Code: Select all

bash-3.2# tail -100 /var/adm/messages
Apr  9 07:14:26 csbtipdcapmdw07 nrpe[2939]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:15:01 csbtipdcapmdw07 nrpe[3145]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:16:35 csbtipdcapmdw07 nrpe[3647]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:19:26 csbtipdcapmdw07 nrpe[4372]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:20:01 csbtipdcapmdw07 nrpe[4460]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:21:35 csbtipdcapmdw07 nrpe[5144]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:24:26 csbtipdcapmdw07 nrpe[6168]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:25:01 csbtipdcapmdw07 nrpe[6368]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:26:35 csbtipdcapmdw07 nrpe[6865]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:29:27 csbtipdcapmdw07 nrpe[7887]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:30:01 csbtipdcapmdw07 nrpe[8038]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:31:35 csbtipdcapmdw07 nrpe[8448]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:34:26 csbtipdcapmdw07 nrpe[9296]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:35:01 csbtipdcapmdw07 nrpe[9452]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:36:35 csbtipdcapmdw07 nrpe[9958]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:39:26 csbtipdcapmdw07 nrpe[10796]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:40:01 csbtipdcapmdw07 nrpe[10949]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:41:35 csbtipdcapmdw07 nrpe[11539]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:44:26 csbtipdcapmdw07 nrpe[12449]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:45:01 csbtipdcapmdw07 nrpe[12611]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:46:35 csbtipdcapmdw07 nrpe[13066]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:49:26 csbtipdcapmdw07 nrpe[13817]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:50:01 csbtipdcapmdw07 nrpe[13992]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:51:35 csbtipdcapmdw07 nrpe[14395]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:54:26 csbtipdcapmdw07 nrpe[15397]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:55:01 csbtipdcapmdw07 nrpe[15574]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:56:35 csbtipdcapmdw07 nrpe[16040]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 07:59:26 csbtipdcapmdw07 nrpe[16851]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:00:01 csbtipdcapmdw07 nrpe[17045]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:01:35 csbtipdcapmdw07 nrpe[17541]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:04:26 csbtipdcapmdw07 nrpe[18654]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:05:01 csbtipdcapmdw07 nrpe[18824]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:06:35 csbtipdcapmdw07 nrpe[19229]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:09:26 csbtipdcapmdw07 nrpe[20096]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:10:01 csbtipdcapmdw07 nrpe[20289]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:11:35 csbtipdcapmdw07 nrpe[20716]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:14:26 csbtipdcapmdw07 nrpe[21578]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:15:01 csbtipdcapmdw07 nrpe[21774]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:16:35 csbtipdcapmdw07 nrpe[22236]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:19:26 csbtipdcapmdw07 nrpe[23033]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:20:01 csbtipdcapmdw07 nrpe[23203]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:21:35 csbtipdcapmdw07 nrpe[23716]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:24:26 csbtipdcapmdw07 nrpe[24774]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:25:01 csbtipdcapmdw07 nrpe[24946]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:26:35 csbtipdcapmdw07 nrpe[25394]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:29:26 csbtipdcapmdw07 nrpe[26134]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:30:01 csbtipdcapmdw07 nrpe[26301]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:31:35 csbtipdcapmdw07 nrpe[26750]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:34:26 csbtipdcapmdw07 nrpe[27586]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:35:01 csbtipdcapmdw07 nrpe[27773]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:36:35 csbtipdcapmdw07 nrpe[28476]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:39:26 csbtipdcapmdw07 nrpe[29337]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:40:01 csbtipdcapmdw07 nrpe[29515]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:41:35 csbtipdcapmdw07 nrpe[63]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:44:26 csbtipdcapmdw07 nrpe[1056]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:45:01 csbtipdcapmdw07 nrpe[1244]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:46:35 csbtipdcapmdw07 nrpe[1683]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:49:26 csbtipdcapmdw07 nrpe[2431]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:50:01 csbtipdcapmdw07 nrpe[2595]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:51:35 csbtipdcapmdw07 nrpe[3029]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:54:26 csbtipdcapmdw07 nrpe[3980]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:55:01 csbtipdcapmdw07 nrpe[4235]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:56:35 csbtipdcapmdw07 nrpe[4748]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 08:59:26 csbtipdcapmdw07 nrpe[5519]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:00:01 csbtipdcapmdw07 nrpe[5744]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:01:35 csbtipdcapmdw07 nrpe[6306]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:04:26 csbtipdcapmdw07 nrpe[7234]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:05:01 csbtipdcapmdw07 nrpe[7444]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:06:35 csbtipdcapmdw07 nrpe[7843]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:09:26 csbtipdcapmdw07 nrpe[8669]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:10:01 csbtipdcapmdw07 nrpe[9098]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:11:35 csbtipdcapmdw07 nrpe[9547]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:14:26 csbtipdcapmdw07 nrpe[10406]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:15:01 csbtipdcapmdw07 nrpe[10626]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:16:36 csbtipdcapmdw07 nrpe[11048]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:19:26 csbtipdcapmdw07 nrpe[11824]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:20:01 csbtipdcapmdw07 nrpe[12017]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:21:35 csbtipdcapmdw07 nrpe[12531]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:24:26 csbtipdcapmdw07 nrpe[13473]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:25:01 csbtipdcapmdw07 nrpe[13663]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:26:40 csbtipdcapmdw07 nrpe[14224]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:29:26 csbtipdcapmdw07 nrpe[14951]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:30:01 csbtipdcapmdw07 nrpe[15148]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:31:35 csbtipdcapmdw07 nrpe[15611]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:34:26 csbtipdcapmdw07 nrpe[16481]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:35:07 csbtipdcapmdw07 nrpe[16691]: [ID 601491 daemon.notice] Starting up daemon
Apr  9 09:35:34 csbtipdcapmdw07 nrpe[16757]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:36:35 csbtipdcapmdw07 nrpe[17180]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:39:26 csbtipdcapmdw07 nrpe[18006]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:40:01 csbtipdcapmdw07 nrpe[18181]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:41:35 csbtipdcapmdw07 nrpe[18742]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:44:26 csbtipdcapmdw07 nrpe[19684]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:45:01 csbtipdcapmdw07 nrpe[20000]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:46:35 csbtipdcapmdw07 nrpe[20492]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:49:26 csbtipdcapmdw07 nrpe[21279]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:50:01 csbtipdcapmdw07 nrpe[21452]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:51:35 csbtipdcapmdw07 nrpe[21869]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:54:26 csbtipdcapmdw07 nrpe[22784]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:55:02 csbtipdcapmdw07 nrpe[22970]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
Apr  9 09:56:08 csbtipdcapmdw07 nrpe[23407]: [ID 381997 daemon.error] Host 10.194.78.206 is not allowed to talk to us!
bash-3.2# 
We have three IP address and I had "10.194.78.208" added to nrpe.cfg file. But seems "10.194.78.206" is being used for communication. So, I added "10.194.78.206" in npre.cfg and restarted the nrpe, attaching updated

Code: Select all

nrpe.cfg
for your reference

Code: Select all

hostname -I
10.194.78.206 10.194.78.208 10.195.159.100
Now, I could see better output for the command.

Code: Select all

[guptaa@cacbigdcapmdw51 ~]$ date; /usr/local/nagios/libexec/check_nrpe  -H 10.92.34.66
Tue Apr  9 10:08:16 EDT 2019
NRPE v2.13
However, still I can see "CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected)." for my services in dashboard, pls refer attached screenshot.

Please suggest.
You do not have the required permissions to view the files attached to this post.
anilgupta
Posts: 102
Joined: Fri Mar 01, 2019 8:35 am

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by anilgupta »

What I mean is:

Below nrpe commands don't work:

Code: Select all

[guptaa@cacbigdcapmdw51 log]$ date;/usr/local/nagios/libexec/check_nrpe -H 10.92.34.66 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Tue Apr  9 14:39:17 EDT 2019
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[guptaa@cacbigdcapmdw51 log]$ date;/usr/local/nagios/libexec/check_nrpe -n -H 10.92.34.66 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Tue Apr  9 14:41:19 EDT 2019
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
[guptaa@cacbigdcapmdw51 log]$ date;/usr/local/nagios/libexec/check_nrpe -n -2 -H 10.92.34.66 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Tue Apr  9 14:41:26 EDT 2019
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
But plain command works:

Code: Select all

[guptaa@cacbigdcapmdw51 log]$ date;/usr/local/nagios/libexec/check_nrpe -H 10.92.34.66
Tue Apr  9 14:39:27 EDT 2019
NRPE v2.13
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE: Error - Could not connect to . Check system

Post by npolovenko »

@anilgupta, The check_disk command that you're using is not defined in the nrpe.cfg file on the Solaris server.
Please open the nrpe.cfg file and add the following command to the bottom of the file, where you have all these commands:
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_app_disk]=/usr/local/nagios/libexec/check_app_disk -w 80 -c 90
command[check_load]=/usr/local/nagios/libexec/check_load -w 6 -c 10
command[check_oid_log]=/usr/local/nagios/libexec/check_oid_log
command[check_gosecenrol_log]=/usr/local/nagios/libexec/check_gosecenrol_log
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Save the file and restart the nrpe service on the Solaris server one more time.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked