CRITICAL - Socket timeout after 20 seconds

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

CRITICAL - Socket timeout after 20 seconds

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CRITICAL - Socket timeout after 20 seconds

Post 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>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

Re: CRITICAL - Socket timeout after 20 seconds

Post 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 ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CRITICAL - Socket timeout after 20 seconds

Post by slansing »

You need to open ports 5666 and 12489 by default, unless you've changed the configuration file to something else.
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

Re: CRITICAL - Socket timeout after 20 seconds

Post 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)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CRITICAL - Socket timeout after 20 seconds

Post 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.
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

Re: CRITICAL - Socket timeout after 20 seconds

Post by lafargeuser »

It is windows server.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CRITICAL - Socket timeout after 20 seconds

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: CRITICAL - Socket timeout after 20 seconds

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

Re: CRITICAL - Socket timeout after 20 seconds

Post by lafargeuser »

Did the changes. But still I get (Service Check Timed Out) errors.
Locked