CRITICAL - Socket timeout after 10 seconds

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

CRITICAL - Socket timeout after 10 seconds

Post by ecarrasq »

Linux Distribution and version? CentOS, 2.6.18-308.8.2.el5PAE
32 or 64bit? 32bit
VMware Image or Manual Install of XI? VMware Image
Are there specials configurations on your system, ie; is Gnome installed? No
Are you using a proxy? No
Are you using SSL? Yes
Nagios Version? Nagios XI 2012R1.6

I've been doing several "Web Page Content" checks, and HTTP Error code "expected code" checks, and keep receiving "CRITICAL - Socket timeout after 10 seconds".

Here are two examples:

This one keeps giving the Socket timeout after 10 seconds:
check_xi_service_http! -N -f ok -I <IP Address> -u "/path/ofpage" -p 80 -e 301,302
This one give the Socket timeout after 10 seconds, but not all the time:
check_xi_service_http!-s "172207-0020_t.jpg" -f ok -I <IP Address> -u "/path/ofpage" -p 80
Please help.

Thanks,
Eddie

2nd question: does the check_http include a "Connection: close header" once it is done with the request?
Last edited by ecarrasq on Thu Mar 07, 2013 12:23 pm, edited 2 times in total.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by sreinhardt »

Depending on the service check and command, you may want to either modify the command within CCM or use the last unused argument to specify -t [timeout]. Something around 20-30 seconds would be much more lax if the service is overworked or a longer check, but not so much so that it would cause major delays.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by sreinhardt »

As for your second question, are you refering to with a successfully completed check, does the plugin properly alert the server to close the http connection? I would tend to believe so, as half open connections, would not be a good thing, however I will have to take a moment to look at the code to better answer your question.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by ecarrasq »

I increased the timeout to 20 and 30 seconds, but now:
CRITICAL - Socket timeout after 20 seconds
CRITICAL - Socket timeout after 30 seconds
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CRITICAL - Socket timeout after 10 seconds

Post by slansing »

Lets try the following from the command line:

Code: Select all

/usr/local/nagios/libexec/check_http -H Ip.Of.Host.tobechecked or -I address.to.be.checked -p 80 -u /path/to/check/on/page -e 301,302
Be sure that you have chosen either -H or -I correctly for your case, as the wrong one WILL result in the error you are getting.
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by ecarrasq »

Fixed:
check_xi_service_http! -N -f ok -I <IP Address> -u "/path/ofpage" -p 80 -e 301,302
I removed the "-I <IP ADDRESS>" and it went through ok. Since the site is hosted off site, the IP was changed last night causing the alerts.

But,

would like to get more information, on how the "CRITICAL - SOCKET TIMEOUT AFTER 10 SECONDS" occur, and/or how/where I can look into some logs to figure out the reason.

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

Re: CRITICAL - Socket timeout after 10 seconds

Post by slansing »

Thank you for letting us know.
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by ecarrasq »

You are welcome.

I would still like to get more information, on how the "CRITICAL - SOCKET TIMEOUT AFTER 10 SECONDS" occur, and/or how/where I can look into some logs to figure out the reason.

Please assist.

Thanks!
Eddie
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CRITICAL - Socket timeout after 10 seconds

Post by abrist »

Socket timeout errors can be caused by the remote system not responding to the check. Either the command is formatted incorrectly, the server is not responding, or the target ip is wrong. It can also be caused by firewall issues, or route issues. It is a catchall error for when the checked system does not respond.

Checking nagios.log and running the most basic form of the check from the cli can shed some light on the problems. Port mapping the checked port from the nagios server can help as well. Otherwise you will need to check the remote system's associated logs for the checked service for any clues.
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.
Locked