Page 1 of 7

CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Tue Sep 23, 2014 2:18 am
by kakaluru
Hi,

My RHEL server is connected to Nagios server and it has running 14 services. All services status in Nagios server is showing as "CHECK_NRPE: Socket timeout after 20 seconds. "

Action done :
1. netstat -at | grep check_nrpe - Client side it's listening.

Kindly help me to resolve this.

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Tue Sep 23, 2014 10:00 am
by slansing
I'd check out the common issues "timeout after n seconds" section here:

http://assets.nagios.com/downloads/nagi ... utions.pdf

It was written more from XI's perspective, but it will still work fine for Core.

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Wed Sep 24, 2014 4:11 am
by kakaluru
Thx for response slan

Let me know where i can get "configure" Tab on my nagios core home page.

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Wed Sep 24, 2014 10:19 am
by slansing
You cannot get it in Core, as I was mentioning, the document was written for Nagios XI, but the changes you can make to commands, services, and generally everything mentioned in it, can be done with Core. The only thing is you need to do them manually with your .cfg files instead of using the web frontend that XI gives you.

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Thu Sep 25, 2014 2:35 am
by kakaluru
Hi,

I made the changes but still the issue is existing.

I hope it might be any network issue. can you plz guide me to resolve this.

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Thu Sep 25, 2014 11:26 am
by lmiltchev
Is port 5666 open? Run the following commands from the CLI on the nagios server and show us the output:

Code: Select all

./check_nrpe -H <client ip>
nmap <client ip> -p 5666

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Fri Sep 26, 2014 1:56 am
by kakaluru
Hi,
Below is the output.

[root@nagiosserver]# nmap -p 5666 10.174.16.11(client ip)

Starting Nmap 5.51 ( http://nmap.org ) at 2014-09-26 12:01 IST
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for BUGZILLABCK (10.174.16.11)
Host is up (0.039s latency).
PORT STATE SERVICE
5666/tcp filtered nrpe


Nmap done: 1 IP address (1 host up) scanned in 0.54 seconds

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Fri Sep 26, 2014 12:40 pm
by sreinhardt
Filtered generally means that nmap got a valid connection, but was rejected from any further communication. Do you have the nagios system added to the allowed_hosts directive in /etc/xinet.d/nrpe? If so, have you restarted xinetd (service xinetd restart)? Has this worked ever, or is this a new setup and you are still trying to get it working for the first time?

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Mon Sep 29, 2014 2:27 am
by kakaluru
Hi,

cat /etc/xinetd.d/nrpe
# 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 = 127.0.0.1 192.168.30.38[NagiosServer]
}
[root@BUGZILLABCK ~]# service xinetd status
xinetd (pid 24981) is running...
[root@BUGZILLABCK ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@BUGZILLABCK ~]# service xinetd status
xinetd (pid 5197) is running...

After performing above action also i am facing same issue. ******CHECK_NRPE: Socket timeout after 20 seconds.******

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Posted: Mon Sep 29, 2014 1:55 pm
by sreinhardt
OK, that looks good for xinetd profile. How about iptables?

Code: Select all

iptables -L -n