check_http CRITICAL - Socket timeout
check_http CRITICAL - Socket timeout
Nagios XI 3.2 64 Bit VM install
CentOS release 6.2
I'm using Website URL host wizard to monitor approx 200 hosted websites across 4 web servers. The actual Host check command is as follows:
check_xi_service_http!-S !!!!!!! against the dns.hostname.com.
For websites on 2 of the 4 servers I get this error [ CRITICAL - Socket timeout after 10 seconds ], but I am able to access the sites without problem from the browser. I have used the check_http from the command line to vary the timeout with no change. Since the problem is limited to 2 of the 4 servers, and all sites on those servers so far, is there a test or check that I could provide my network support team to help identify the problem? I'm guessing it is either a configuration problem on those two servers or possibly a firewall problem? Thoughts, comments, appreciated.
CentOS release 6.2
I'm using Website URL host wizard to monitor approx 200 hosted websites across 4 web servers. The actual Host check command is as follows:
check_xi_service_http!-S !!!!!!! against the dns.hostname.com.
For websites on 2 of the 4 servers I get this error [ CRITICAL - Socket timeout after 10 seconds ], but I am able to access the sites without problem from the browser. I have used the check_http from the command line to vary the timeout with no change. Since the problem is limited to 2 of the 4 servers, and all sites on those servers so far, is there a test or check that I could provide my network support team to help identify the problem? I'm guessing it is either a configuration problem on those two servers or possibly a firewall problem? Thoughts, comments, appreciated.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http CRITICAL - Socket timeout
When you connect to these through your browser are you using https:// ?
You have the SSL flag specified with the -S so it is trying to connect via SSL
You have the SSL flag specified with the -S so it is trying to connect via SSL
Re: check_http CRITICAL - Socket timeout
yes. All the sites including both those that work and those that don't use SSL.
I've also downloaded the netcat utility if it can be of any use.
I've also downloaded the netcat utility if it can be of any use.
Re: check_http CRITICAL - Socket timeout
I wonder if this is ipv6-related. Can you force ipv4 by adding a "-4" flag to your command and see if this is going to work?
Also, run the following command and show the output:
Also, run the following command and show the output:
Code: Select all
nc -zv <Website_URL> 443Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_http CRITICAL - Socket timeout
The -4 made no difference.
However, I ran the command requested nc -zv dns.websitename.com 443
Warning: Inverse name lookup failed for `xxx.xx.xxx.xx' ?
dns.websitename.com [xxx.xx.xxx.xx] 443 (https): Connection timed out
You may be on to something here? School me
However, I ran the command requested nc -zv dns.websitename.com 443
Warning: Inverse name lookup failed for `xxx.xx.xxx.xx' ?
dns.websitename.com [xxx.xx.xxx.xx] 443 (https): Connection timed out
You may be on to something here? School me
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http CRITICAL - Socket timeout
just to make sure this still isn't an IPv6 thing.
Did you run the command from the command line like so?
Also, can you run the following from the commandline successfully?
Did you run the command from the command line like so?
Code: Select all
cd /usr/local/nagios/libexec
./check_http -H dns.websitename.com -S -4Also, can you run the following from the commandline successfully?
Code: Select all
curl https://dns.websitename.comRe: check_http CRITICAL - Socket timeout
Yes, I did run the command as
cd /usr/local/nagios/libexec
./check_http -H dns.websitename.com -S -4
Following is what I get from the curl command:
curl https://dns.websitename.com
curl: (7) couldn't connect to host
cd /usr/local/nagios/libexec
./check_http -H dns.websitename.com -S -4
Following is what I get from the curl command:
curl https://dns.websitename.com
curl: (7) couldn't connect to host
Re: check_http CRITICAL - Socket timeout
It seems like you cannot connect to this website from your machine. You should've seen some html output, etc. Try running this (for comparison):
Code: Select all
curl https://www.amazon.comBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_http CRITICAL - Socket timeout
curl https://www.amazon.com
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.amazon.com/">here</a>.</p>
</body></html>
I get a similar output for the other servers that work ok.
OK, working with you has turn the lights on. You are definitely correct. I was confusing the fact I could access the server via my browser which is from a different machine. I'll follow up with my network team and to resolve.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.amazon.com/">here</a>.</p>
</body></html>
I get a similar output for the other servers that work ok.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http CRITICAL - Socket timeout
Sounds good...