You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "YAWN,MIKE (HP-PaloAlto,ex1)" <mi...@hp.com> on 2003/08/18 23:00:46 UTC

HttpClient recoverable exceptions with HTTPS

(I suspect this might be answered in archives, but they appear to be
offline)

I seem to get extremely high numbers of HttpRecoverableExceptions when
accessing a web site via HTTPS.  No such problem is seen with HTTP.
Generally, by bumping up the number of repeated attempts (from 3 to 25) it
will almost always succeed eventually, but this seems like a real kludge and
I'd like to understand and resolve the root cause.

I see slightly different stack traces depending on whether the client is
executing on a Windows or a UNIX (HP-UX) box:

UNIX exception:
2003-08-14 10:01:14,814 WARN  HttpConnection - HttpConnection: Socket
exception while writing data
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
        at
org.apache.commons.httpclient.HttpConnection.writeLine(HttpConnection.java:6
95)
        at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.jav
a:1980)
        at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.j
ava:2305)
        at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:922
)
        at com.hp.wfm.spot.HttpTest.executeMethod(HttpTest.java:165)
        at com.hp.wfm.spot.HttpTest.run(HttpTest.java:81)
        at com.hp.wfm.spot.TestSuite.run(TestSuite.java:165)
        at java.lang.Thread.run(Thread.java:536)
2003-08-14 10:01:14,818 INFO  HttpMethod - Recoverable exception caught when
writing request

On Windows 2000, the SocketException is 'recv failed', rather than 'broken
pipe' when trying to read back the response.

I can find several references to these errors on the Java Forums at Sun, and
they do seem to be associated to the use of SSL - but there is no solution
posted that I could find, and most of the attempted workarounds use the
standard Sun classes (URLConnection).  Has anyone run into this using
HttpClient, and is there a workaround or solution (other than
retry-until-success?)

Thanks,
Mike

Re: HttpClient recoverable exceptions with HTTPS

Posted by Michael Becke <be...@u.washington.edu>.
Hi Mike,

Which version of HttpClient are you using?

Please take a look at the troubleshooting guide at  
<http://jakarta.apache.org/commons/httpclient/troubleshooting.html> for  
some debugging ideas.  If you are using the most recent release of  
HttpClient and the troubleshooting does not help please post a full  
wire log that shows the problem  
<http://jakarta.apache.org/commons/httpclient/logging.html>.

Mike

On Monday, August 18, 2003, at 05:00 PM, YAWN,MIKE (HP-PaloAlto,ex1)  
wrote:

> (I suspect this might be answered in archives, but they appear to be
> offline)
>
> I seem to get extremely high numbers of HttpRecoverableExceptions when
> accessing a web site via HTTPS.  No such problem is seen with HTTP.
> Generally, by bumping up the number of repeated attempts (from 3 to  
> 25) it
> will almost always succeed eventually, but this seems like a real  
> kludge and
> I'd like to understand and resolve the root cause.
>
> I see slightly different stack traces depending on whether the client  
> is
> executing on a Windows or a UNIX (HP-UX) box:
>
> UNIX exception:
> 2003-08-14 10:01:14,814 WARN  HttpConnection - HttpConnection: Socket
> exception while writing data
> java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
>         at  
> java.net.SocketOutputStream.write(SocketOutputStream.java:124)
>         at
> org.apache.commons.httpclient.HttpConnection.writeLine(HttpConnection.j 
> ava:6
> 95)
>         at
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBas 
> e.jav
> a:1980)
>         at
> org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodB 
> ase.j
> ava:2305)
>         at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.jav 
> a:922
> )
>         at com.hp.wfm.spot.HttpTest.executeMethod(HttpTest.java:165)
>         at com.hp.wfm.spot.HttpTest.run(HttpTest.java:81)
>         at com.hp.wfm.spot.TestSuite.run(TestSuite.java:165)
>         at java.lang.Thread.run(Thread.java:536)
> 2003-08-14 10:01:14,818 INFO  HttpMethod - Recoverable exception  
> caught when
> writing request
>
> On Windows 2000, the SocketException is 'recv failed', rather than  
> 'broken
> pipe' when trying to read back the response.
>
> I can find several references to these errors on the Java Forums at  
> Sun, and
> they do seem to be associated to the use of SSL - but there is no  
> solution
> posted that I could find, and most of the attempted workarounds use the
> standard Sun classes (URLConnection).  Has anyone run into this using
> HttpClient, and is there a workaround or solution (other than
> retry-until-success?)
>
> Thanks,
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>