How to know at what point a request fails on Windows 8

0

I'm testing a small script on Windows 8, which tries to fetch a simple web page on port 80. However the network connection fails everytime with error 10053.

I thought initially of a firewall problem (i'm running McAffee), but I'm not so sure anymore (nothing in logs ; still fails when I deactivate the firewall).

So what can I do to delimitate the problem ? For example, how can be sure whether the the request has left the network card ?

I ran Wireshark, and it does indeed show me a small activity :

(me) SYN

(remote ip) SYN, ACK

(me) ACK

(me) RST, ACK

So does it mean the request was indeed sent ?

Thanks in advance

Eino Gourdin

Posted 2013-11-29T16:07:13.400

Reputation: 123

Answers

2

Winsock error 10053 = "WSAECONNABORTED":

SOCKET_ERROR: An established connection was aborted by the software in your host machine.

The "software" mentioned is (most likely) Winsock itself.

Found this page, which has an excellent blurb that seems to cover exactly what you're running into, in that it's probably your script not forming a proper HTTP header.

An HTTP POST is to be sent to an HTTP server.
The server begins reading the POST and notices that the HTTP request header is invalid.
It immediately sends an HTTP response (with an error status, perhaps status=400) and closes the connection without trying to continue reading the remainder of the HTTP request that is forthcoming.

Meanwhile, the client is still happily writing the remainder of the HTTP request to the socket. (Remember a TCP/IP socket connection needs to be closed from both sides. In this case, the server has closed its side, but the client is still pumping data into the half-open connection.)

The client finishes writing the HTTP POST to the socket — meaning that data has been buffered to Winsock. The client application then tries to read the HTTP response, but it cannot because the outgoing retransmission (of the buffered data by WinSock) failed and the socket connection was shutdown on the client side (by Winsock). Even though the HTTP server sent the response, it is lost and cannot be retrieved. The error your application will receive when trying to read the HTTP response on the socket is WSAECONNABORTED.

Ƭᴇcʜιᴇ007

Posted 2013-11-29T16:07:13.400

Reputation: 103 763

Thanks for the info! The aborted connection part seems very likely, it coincides with what I read about RST, ACK. But the problem lies even before the HTTP header are sent, as the connection is reset after the first SYN/ACK. The script has no chance to send its HTTP request. Maybe the system shuts down the connection just after it has been opened, and when the remote server responds, the port is already closed, hence the RST/ACK..? I don't know :/ – Eino Gourdin – 2013-11-29T18:11:20.397