You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Saurabh AMBASTA <sa...@lexmarkpartners-europe.com> on 2007/07/19 17:52:11 UTC
Socket closed exception with one particular url
Hi,
We are monitoring important urls using the httpclient. We are able to get
a response from all urls except for one, where we get this exception The
URL opens from IE. What could be the problem ?
[INFO] HttpMethodDirector - Retrying request
java.net.SocketException: Socket closed
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:67)
at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:125)
at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(Unknown Source)
at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
thanks and regards,
Saurabh Ambasta
Phone : 33 - (0) 2 38 71 1508
Email : saurabh.ambasta@lexmarkpartners-europe.com
Re: Socket closed exception with one particular url
Posted by Roland Weber <os...@dubioso.net>.
Saurabh AMBASTA wrote:
> We are monitoring important urls using the httpclient. We are able to get
> a response from all urls except for one, where we get this exception The
> URL opens from IE. What could be the problem ?
Hello,
try to make the HttpClient request as similar to the IE request as possible.
We've had a case where the value of User-Agent made the difference, but
some servers also fail if you send multiple cookies in separate headers
instead of folding them into a single one. Tracing SSL is a bit tricky,
but maybe you can use an SSL-enabled server with an echo servlet to check
what headers IE sends.
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