You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ingo Brunberg <ib...@fiz-chemie.de> on 2003/04/11 13:32:38 UTC

Still problems with HttpRecoverableException and HTTPS

Hi,

although obviously many attempts have been made to recover from lost
connections, the HttpRecoverableException is still slipping through. I
am using Stunnel (www.stunnel.org) in proxy mode to provide the
encryption.

The problem occurs when the connection has been idle for some time and
the next request is made.

Currently this is a serious drawback for our project, so let me know
if you need further help.

Regards,
Ingo

Here is the log:

[TRACE] HttpState - -enter HttpState.getCredentials(String)
[TRACE] HttpState - -enter HttpState.getCredentials(String, String
[TRACE] HttpClient - -enter HttpClient.executeMethod(HttpMethod)
[TRACE] HttpClient - -enter HttpClient.executeMethod(HostConfiguration,HttpMethod)
[TRACE] HttpMethod - -enter HttpMethodBase.execute(HttpState, HttpConnection)
[DEBUG] HttpMethod - -Execute loop try 1
[TRACE] HttpMethod - -enter HttpMethodBase.processRequest(HttpState, HttpConnection)
[TRACE] HttpMethod - -Attempt number 1 to write request
[TRACE] HttpMethod - -enter HttpMethodBase.writeRequest(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpMethod - -enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
[DEBUG] HttpMethod - -Adding Host request header
[TRACE] HttpMethod - -enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
[TRACE] HttpState - -enter HttpState.getCookies()
[TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie[])
[TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie
[TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie)
[TRACE] CookieSpec - -enter RFC2109Spec.formatCookie(Cookie)
[TRACE] CookieSpec - -enter RFC2109Spec.formatCookieAsVer(Cookie)
[TRACE] HttpMethod - -enter HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter getContentCharSet( Header contentheader )
[TRACE] HeaderElement - -enter HeaderElement.parse(String)
[TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
[TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.print(String)
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.writeLine()
[TRACE] HttpConnection - -enter HttpConnection.write(byte[])
[TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
[TRACE] HttpConnection - -enter HttpConnection.getRequestOutputStream()
[TRACE] HttpMethod - -enter HttpMethodBase.readResponse(HttpState, HttpConnection)
[TRACE] HttpMethod - -enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
[TRACE] HttpConnection - -enter HttpConnection.readLine()
[TRACE] HttpParser - -enter HttpParser.readLine()
[TRACE] HttpParser - -enter HttpParser.readRawLine()
[WARN] HttpMethod - -Recoverable exception caught when reading response
[DEBUG] HttpMethod - -Closing the connection.
[TRACE] HttpConnection - -enter HttpConnection.close()
[TRACE] HttpConnection - -enter HttpConnection.closeSockedAndStreams()


Re: Still problems with HttpRecoverableException and HTTPS

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I use the latest code from CVS. The application is jakarta-slide.
The question that comes to my mind is why httpclient does not attempt
a retry in this case, whereas it does so if an exception is thrown in
other parts of the code.

Regards,
Ingo

> Ingo,
> 
> A few details might be nice.  What version of HttpClient are you using? 
> Have you tried with a recent nightly build?  Do you have any example 
> code that exploits this problem?  There have been quite a few changes as 
> of late, in particular with the way that HTTPS and connection reuse are 
> handled.  Though I appreciate the LOG it, does not tell us much other 
> than an attempt to write request headers failed.
> 
> Mike
> 
> Ingo Brunberg wrote:
> > Hi,
> > 
> > although obviously many attempts have been made to recover from lost
> > connections, the HttpRecoverableException is still slipping through. I
> > am using Stunnel (www.stunnel.org) in proxy mode to provide the
> > encryption.
> > 
> > The problem occurs when the connection has been idle for some time and
> > the next request is made.
> > 
> > Currently this is a serious drawback for our project, so let me know
> > if you need further help.
> > 
> > Regards,
> > Ingo
> > 
> > Here is the log:
> > 
> > [TRACE] HttpState - -enter HttpState.getCredentials(String)
> > [TRACE] HttpState - -enter HttpState.getCredentials(String, String
> > [TRACE] HttpClient - -enter HttpClient.executeMethod(HttpMethod)
> > [TRACE] HttpClient - -enter HttpClient.executeMethod(HostConfiguration,HttpMethod)
> > [TRACE] HttpMethod - -enter HttpMethodBase.execute(HttpState, HttpConnection)
> > [DEBUG] HttpMethod - -Execute loop try 1
> > [TRACE] HttpMethod - -enter HttpMethodBase.processRequest(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -Attempt number 1 to write request
> > [TRACE] HttpMethod - -enter HttpMethodBase.writeRequest(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
> > [DEBUG] HttpMethod - -Adding Host request header
> > [TRACE] HttpMethod - -enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
> > [TRACE] HttpState - -enter HttpState.getCookies()
> > [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie[])
> > [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie
> > [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie)
> > [TRACE] CookieSpec - -enter RFC2109Spec.formatCookie(Cookie)
> > [TRACE] CookieSpec - -enter RFC2109Spec.formatCookieAsVer(Cookie)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter getContentCharSet( Header contentheader )
> > [TRACE] HeaderElement - -enter HeaderElement.parse(String)
> > [TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
> > [TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.print(String)
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.writeLine()
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> > [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> > [TRACE] HttpConnection - -enter HttpConnection.getRequestOutputStream()
> > [TRACE] HttpMethod - -enter HttpMethodBase.readResponse(HttpState, HttpConnection)
> > [TRACE] HttpMethod - -enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
> > [TRACE] HttpConnection - -enter HttpConnection.readLine()
> > [TRACE] HttpParser - -enter HttpParser.readLine()
> > [TRACE] HttpParser - -enter HttpParser.readRawLine()
> > [WARN] HttpMethod - -Recoverable exception caught when reading response
> > [DEBUG] HttpMethod - -Closing the connection.
> > [TRACE] HttpConnection - -enter HttpConnection.close()
> > [TRACE] HttpConnection - -enter HttpConnection.closeSockedAndStreams()


Re: Still problems with HttpRecoverableException and HTTPS

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

A few details might be nice.  What version of HttpClient are you using? 
Have you tried with a recent nightly build?  Do you have any example 
code that exploits this problem?  There have been quite a few changes as 
of late, in particular with the way that HTTPS and connection reuse are 
handled.  Though I appreciate the LOG it, does not tell us much other 
than an attempt to write request headers failed.

Mike

Ingo Brunberg wrote:
> Hi,
> 
> although obviously many attempts have been made to recover from lost
> connections, the HttpRecoverableException is still slipping through. I
> am using Stunnel (www.stunnel.org) in proxy mode to provide the
> encryption.
> 
> The problem occurs when the connection has been idle for some time and
> the next request is made.
> 
> Currently this is a serious drawback for our project, so let me know
> if you need further help.
> 
> Regards,
> Ingo
> 
> Here is the log:
> 
> [TRACE] HttpState - -enter HttpState.getCredentials(String)
> [TRACE] HttpState - -enter HttpState.getCredentials(String, String
> [TRACE] HttpClient - -enter HttpClient.executeMethod(HttpMethod)
> [TRACE] HttpClient - -enter HttpClient.executeMethod(HostConfiguration,HttpMethod)
> [TRACE] HttpMethod - -enter HttpMethodBase.execute(HttpState, HttpConnection)
> [DEBUG] HttpMethod - -Execute loop try 1
> [TRACE] HttpMethod - -enter HttpMethodBase.processRequest(HttpState, HttpConnection)
> [TRACE] HttpMethod - -Attempt number 1 to write request
> [TRACE] HttpMethod - -enter HttpMethodBase.writeRequest(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
> [DEBUG] HttpMethod - -Adding Host request header
> [TRACE] HttpMethod - -enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
> [TRACE] HttpState - -enter HttpState.getCookies()
> [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie[])
> [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie
> [TRACE] CookieSpec - -enter CookieSpecBase.formatCookieHeader(Cookie)
> [TRACE] CookieSpec - -enter RFC2109Spec.formatCookie(Cookie)
> [TRACE] CookieSpec - -enter RFC2109Spec.formatCookieAsVer(Cookie)
> [TRACE] HttpMethod - -enter HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter getContentCharSet( Header contentheader )
> [TRACE] HeaderElement - -enter HeaderElement.parse(String)
> [TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
> [TRACE] HeaderElement - -enter HeaderElement.parsePair(char[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.print(String)
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.writeLine()
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[])
> [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int)
> [TRACE] HttpConnection - -enter HttpConnection.getRequestOutputStream()
> [TRACE] HttpMethod - -enter HttpMethodBase.readResponse(HttpState, HttpConnection)
> [TRACE] HttpMethod - -enter HttpMethodBase.readStatusLine(HttpState, HttpConnection)
> [TRACE] HttpConnection - -enter HttpConnection.readLine()
> [TRACE] HttpParser - -enter HttpParser.readLine()
> [TRACE] HttpParser - -enter HttpParser.readRawLine()
> [WARN] HttpMethod - -Recoverable exception caught when reading response
> [DEBUG] HttpMethod - -Closing the connection.
> [TRACE] HttpConnection - -enter HttpConnection.close()
> [TRACE] HttpConnection - -enter HttpConnection.closeSockedAndStreams()
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>