hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: socket time out
Date Sat, 08 Dec 2007 04:58:57 GMT
Hello S├ębastien,

>>> 2007-12-04 17:40:38,780 main TRACE httpclient.HttpConnection - enter
>>> HttpConnection.getRequestOutputStream()
>> (*)
>>> 2007-12-04 *17:40:48*,807 main DEBUG httpclient.HttpMethodDirector -
>>> Closing the connection.
>>> 2007-12-04 17:40:48,807 main TRACE httpclient.HttpConnection - enter
>>> HttpConnection.close()
>>> 2007-12-04 17:40:48,807 main TRACE httpclient.HttpConnection - enter
>>> HttpConnection.closeSockedAndStreams()
>>> 2007-12-04 17:40:48,808 main DEBUG transformer.WFSProxyHttpClient -
>>> HttpMethodRetryHandler Exception : Broken pipe
>>   
> no nothing between this 2 steps...no trace...
> in fact in the code :
>        OutputStream outstream = conn.getRequestOutputStream();
>              if (contentLength < 0) {
>            outstream = new ChunkedOutputStream(outstream);
>        }
>              requestEntity.writeRequest(outstream);
> 
> so it took time to write the request...

So the socket doesn't fall down after 10 seconds (which would
indicate a timeout problem) but when the request is sent and
a response would be expected. This indicates that either the
server or (more likely) some firewall inbetween doesn't like
the request you are sending and simply drops the connection.
A server would be expected to send a 4xx response, that's why
I suspect a firewall. We had one case where a firewall didn't
like the "User-Agent" header that HttpClient sends by default.
Replacing that with the User-Agent of some well-known browser
solved the problem.

> the post is an xml post of data, quite heavy...
> 646213  bytes of data, is too heavy ?

The size of the data is not the problem.

a) Can you test with smaller or larger XML data?
That would help to verify that it is not a timeout problem
but occurs always after the full request is sent.

b) Do you have another application that successfully
   communicates with that server?
Then you could compare a request sent by that application
with the request sent by your application.

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message