Windows – HTTP 502 Bad Gateway error response

502-errorfirewallhttpstcpwindows

I'm debugging an issue and running out of ideas. I have a server with SharePoint code hosted at port 8080 and a WCF REST service at port 8801.

From another machine on the domain, I can connect to the SharePoint page. The retrieved page issues a AJAX request to the REST service. This request fails in Fiddler with a 502 error:

`[Fiddler] The socket connection to <FQDN> failed. <br />ErrorCode: 10060. <br />
 A connection attempt failed because the connected party did not properly respond
 after a period of time, or established connection failed because connected host 
 has failed to respond 10.113.108.144:8801`

I verified that the port is open in the firewall and there's an application listening on that port. If I try to telnet to the machine, the connection succeeds for port 8080, but fails for port 8801 with the message:
Connecting To <FQDN>...Could not open connection to the
host, on port 8801: Connect failed

The application listening is hosted in IIS 8 and the only binding is https. When I try the same failing URL from a browser on the VM itself, everything works fine. I got a WireShark trace, and see that the first TCP package is not acknowledged. It never even gets to the SSL handshake. The failing server is running a Chinese OS.

Any ideas on what might be wrong or how to troubleshoot are welcome.

Best Answer

Found the issue. Talked to a network guy who told me that there is a hardware firewall between the two networks involved that is blocking port 8801.

Even though the software firewall on the machine itself had that port open, the traffic never got there.

Related Topic