Page 1 of 1
CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 11:25 am
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?
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 11:49 am
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.
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 11:52 am
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.
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 11:57 am
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
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 12:25 pm
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.
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Tue Mar 05, 2013 4:13 pm
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
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Wed Mar 06, 2013 3:15 pm
by slansing
Thank you for letting us know.
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Thu Mar 07, 2013 12:23 pm
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
Re: CRITICAL - Socket timeout after 10 seconds
Posted: Thu Mar 07, 2013 12:37 pm
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.