Page 1 of 2

CRITICAL - Socket timeout after 10 seconds port monitoring

Posted: Wed Sep 07, 2016 6:55 am
by Naveed
I am monitoring my ports, those are listening on my server.
I have some websites, those urls as follows:

http://1.2.3.4:8002/Retails_8002

I am just monitoring port, if this site would go down, port would not be in listening state, but as start port monitoring, all my ports are monitoring, but few ports are giving following URl.

CRITICAL - Socket timeout after 10 seconds

Please suggest

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 10:44 am
by bwallace
By default, if Nagios does not get the reply from monitored host in 10 seconds it will mark the Service as “CRITICAL – Socket timeout after 10 seconds“

I'm curious about the outcome when you test via command line. Can you post the output of:

/usr/local/nagios/libexec/check_tcp -H 1.2.3.4 -p 8002

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 11:45 am
by Naveed
Getting same error message from command line as well...

[root@AXmonitor vmn]# /usr/local/nagios/libexec/check_tcp -H 1.2.3.4 -p 8000
CRITICAL - Socket timeout after 10 seconds
[root@AXmonitor vmn]# /usr/local/nagios/libexec/check_tcp -H 40.10.25.36 -p 8000
CRITICAL - Socket timeout after 10 seconds

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 12:32 pm
by rkennedy
I thought you said it was port 8002? That's what you've showed this far, and in your screenshot as well. It looks like you changed the port @bwallace mentioned to 8000 - could you please provide clarification here?

On top of that, please run nmap your.ip.here from the Nagios machine, and post the output of this as well.

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 1:36 pm
by Naveed
Port is 8000

All ports are monitoring, no issues, but one port is not giving desired output.

[root@AXmonitor vmn]# nmap 40.110.25.36

Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-07 11:35 PDT
Nmap scan report for 40.110.25.36
Host is up (0.067s latency).
Not shown: 988 closed ports
PORT STATE SERVICE
80/tcp open http
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3389/tcp open ms-wbt-server
5666/tcp open nrpe
8000/tcp filtered http-alt
49152/tcp open unknown
49153/tcp open unknown
49154/tcp open unknown
49155/tcp open unknown
49156/tcp open unknown

Nmap done: 1 IP address (1 host up) scanned in 3.68 seconds

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 2:08 pm
by bwallace
8000/tcp filtered http-alt
-- means a Firewall is blocking access. You'll have to open this port on the FW.

Filtered - "Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port. The filtering could be from a dedicated firewall device, router rules, or host-based firewall software."
https://nmap.org/book/man-port-scanning-basics.html

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 2:20 pm
by Naveed
Great!
Quite logical.

Let me open port on FW and get back to you.

Thank you

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Wed Sep 07, 2016 2:41 pm
by bwallace
You're welcome Naveed, keep us posted.....

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Thu Sep 08, 2016 5:24 am
by Naveed
I have allowed, inbound and outbound port 8000 in advanced firewall settings,
on client server port 8000 is in listening state, but still I am getting same error message.

https://support.rackspace.com/how-to/cr ... wall-2008/

I have followed upper link to allow port.

Moreover I am getting same error message from CLI as well.

[root@AXmonitor vmn]# nmap 40.32.65.95

Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-08 03:18 PDT
Nmap scan report for 40.32.65.95
Host is up (0.066s latency).
Not shown: 987 closed ports
PORT STATE SERVICE
80/tcp open http
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
808/tcp open ccproxy-http
3389/tcp open ms-wbt-server
5666/tcp open nrpe
8000/tcp filtered http-alt
49152/tcp open unknown
49153/tcp open unknown
49154/tcp open unknown
49155/tcp open unknown
49156/tcp open unknown

Nmap done: 1 IP address (1 host up) scanned in 3.73 seconds

Re: CRITICAL - Socket timeout after 10 seconds port monitori

Posted: Thu Sep 08, 2016 9:35 am
by bwallace
8000/tcp filtered http-alt
--- That nmap output is quite accurate, likely a network device such as a FW or proxy is preventing access, not a Windows Firewall. You can try a more targeted nmap scan where we specify the port and also tell it not to use ping (Where xxx is the IP address of the remote server). The results are probably going to be the same, but maybe we will get a more definitive message returned:

nmap -Pn -p T:8000 xxx