Page 1 of 3

CRITICAL - Socket timeout after 20 seconds

Posted: Wed Jan 08, 2014 8:46 am
by lafargeuser
I am receiving many alerts of CRITICAL - Socket timeout after 20 seconds on Windows Server

However, I have increased the “Socket timeout” value from the default 10 seconds to 20 in /usr/local/nagios/etc/objects/commands.cfg

Still I am receiving alerts.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Wed Jan 08, 2014 11:52 am
by abrist
What type of check/agent is this?
Have you port scanned the remote windows servers from the nagios server?

Code: Select all

nmap <ip of windows server>

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Thu Jan 09, 2014 6:10 am
by lafargeuser
I have installed NSclient agent on end windows server.

What type of check/agent is this?
Have you port scanned the remote windows servers from the nagios server?

Output of nmap command is
[root@BGLRLXNAGIOS01 servers]# nmap 172.18.98.55


Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2014-01-09 16:38 IST
Interesting ports on nagiosserver.com (172.18.98.55):
Not shown: 1672 closed ports
PORT STATE SERVICE
135/tcp open msrpc
139/tcp open netbios-ssn
199/tcp open smux
389/tcp open ldap
445/tcp open microsoft-ds
636/tcp open ldapssl
3389/tcp open ms-term-serv
8888/tcp open sun-answerbook
MAC Address: 00:50:56:AB:00:6D (VMWare)

Nmap finished: 1 IP address (1 host up) scanned in 12.588 seconds

How can I suppess this alerts ?

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Thu Jan 09, 2014 10:36 am
by slansing
You need to open ports 5666 and 12489 by default, unless you've changed the configuration file to something else.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Mon Jan 13, 2014 12:46 am
by lafargeuser
Ports are open,so far it was working fine.

However, I have increased time value from 30 to 60 & Now I see below error.

(Service Check Timed Out)

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Mon Jan 13, 2014 11:57 am
by slansing
That is likely because your timeout rate is still set to 10,20,or 30 in the remote host's nrpe.cfg file, you should change this value there as well and restart xinetd/nrpe.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Tue Jan 14, 2014 12:39 am
by lafargeuser
It is windows server.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Tue Jan 14, 2014 11:36 am
by slansing
Then you need to uncomment ";socket_timeout=30" in the nsc/nsclient.ini file and change the timeout range to something higher, and restart the nsclient service.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Tue Jan 14, 2014 11:38 am
by lmiltchev
Do you have a line, similar to this one:

Code: Select all

;# SOCKET TIMEOUT
;  Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
socket_timeout=60
in the NSC.ini file (or nsclient.ini, depending on the version)?

After modifying the socket timeout in the nsclient++ config, you will have to restart the nsclient++ service on the windows box, so that changes can take effect.

Hope this helps.

Re: CRITICAL - Socket timeout after 20 seconds

Posted: Thu Jan 16, 2014 8:23 am
by lafargeuser
Did the changes. But still I get (Service Check Timed Out) errors.