commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@bluewin.ch>
Subject RE: [HttpClient] wierd sudden connection close
Date Mon, 13 Sep 2004 12:07:17 GMT
On Mon, 2004-09-13 at 13:47, Lesaint Sébastien wrote:

> I'm new to the commons-users mailing list, but looks like you're doing quite
> a log of support of the HttpClient, Oleg, thanks for that :)
> 
> Seb'
> 
Small thing. I am glad I managed to be of help 

Oleg

> 
> -----Message d'origine-----
> De : Oleg Kalnichevski [mailto:olegk@bluewin.ch] 
> Envoyé : lundi 13 septembre 2004 13:03
> À : Jakarta Commons Users List
> Objet : Re: [HttpClient] wierd sudden connection close
> 
> Sébastien,
> 
> DEBUG [org.apache.commons.httpclient.HttpConnection]
> > HttpConnection.setSoTimeout(1000)
> 
> The socket timeout is set to just 1 second, so there may be nothing
> weird about your getting a timeout exception. Consider setting the
> socket timeout to a greater value
> 
> Oleg
> 
> 
> 
> On Mon, 2004-09-13 at 10:23, Lesaint Sébastien wrote:
> > Hello,
> > 
> >  
> > 
> > I'm using Httpclient to connect a java program to a servlet, sending back
> > and forth XML over http using POST method. I've written a sub program to
> > test my servlet. The sub program sends series of requests to the servlet.
> > Requests are not the same from a serie to another.
> > 
> > Generally, the sub program doesn't run until the end of the second serie,
> > there is a sudden connection close that ends up in a
> > java.net.SocketTimeoutException: Read timed out being raised.
> > 
> >  
> > 
> > A previous version of the subprogram was running perfectly OK, it used
> Http
> > GET method and URLEncoded params.
> > 
> >  
> > 
> > I'm about to try using a packet tracing program to see if a can get some
> > information.
> > In the meantime, if somebody could give me a clue about this, here is the
> > wire and context log for the last request:
> > 
> >  
> > 
> > Thanks in advance.
> > 
> >  
> > 
> >  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> -
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > 
> > DEBUG [org.apache.commons.httpclient.methods.GetMethod] enter
> > GetMethod(String)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.setRequestBody(String)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter
> > PostMethod.clearRequestBody()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.clearRequestBody()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpClient] enter
> > HttpClient.executeMethod(HttpMethod)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpClient] enter
> > HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > enter HttpConnectionManager.getConnection(HostConfiguration, long)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > HttpConnectionManager.getConnection:  config = HostConfiguration[host=sle,
> > protocol=http:80, port=80], timeout = 0
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > Getting free connection, hostConfig=HostConfiguration[host=sle,
> > protocol=http:80, port=80]
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection]
> > HttpConnection.setSoTimeout(1000)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.execute(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] Execute loop try 1
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.processRequest(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] Attempt number 1 to
> > process request
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.writeRequest(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.writeRequestLine(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.generateRequestLine(HttpConnection, String, String, String,
> > String)
> > 
> > DEBUG [httpclient.wire.header] >> "POST /sisa/sisa HTTP/1.1[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.ExpectContinueMethod] enter
> > ExpectContinueMethod.addRequestHeaders(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addRequestHeaders(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] Adding Host request
> > header
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpState] enter
> HttpState.getCookies()
> > 
> > DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
> > CookieSpecBase.match(String, int, String, boolean, Cookie[])
> > 
> > DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
> > CookieSpecBase.match(String, int, String, boolean, Cookie
> > 
> > DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
> > CookieSpecBase.formatCookieHeader(Cookie)
> > 
> > DEBUG [org.apache.commons.httpclient.cookie.CookieSpec] enter
> > CookieSpecBase.formatCookie(Cookie)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState,
> HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.getRequestContentLength()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter
> > PostMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter
> > PostMethod.renerateRequestBody()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.renerateRequestBody()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > getContentCharSet( Header contentheader )
> > 
> > DEBUG [org.apache.commons.httpclient.HeaderElement] enter
> > HeaderElement.parse(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HeaderElement] enter
> > HeaderElement.parsePair(char[], int, int)
> > 
> > DEBUG [org.apache.commons.httpclient.HeaderElement] enter
> > HeaderElement.parsePair(char[], int, int)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase]
> > HttpMethodBase.addRequestHeader(Header)
> > 
> > DEBUG [httpclient.wire.header] >> "Content-Type: text/xml;
> > charset=UTF-8[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta
> > Commons-HttpClient/2.0.1[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [httpclient.wire.header] >> "Host: sle[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [httpclient.wire.header] >> "Cookie:
> > JSESSIONID=80EA6B3F200BE79F7D40D258232E48DF[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [httpclient.wire.header] >> "Content-Length: 238[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.print(String)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.writeLine()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[])
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.write(byte[], int, int)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.flushRequestOutputStream()
> > 
> > DEBUG [httpclient.wire.header] >> "[\r][\n]"
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.writeRequestBody(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter
> > PostMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.getRequestContentLength()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter
> > PostMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] enter
> > EntityEnclosingMethod.hasRequestContent()
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] Using
> > buffered request body
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.getRequestOutputStream()
> > 
> > DEBUG [httpclient.wire.content] >> "<?xml version="1.0"
> > encoding="UTF-8"?>[\n]"
> > 
> > DEBUG [httpclient.wire.content] >> "<xmlContent>blablabla</xmlContent>"
> > 
> > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod]
> Request
> > body sent
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.flushRequestOutputStream()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.readResponse(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter
> > HttpMethodBase.readStatusLine(HttpState, HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.readLine()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpParser] enter
> HttpParser.readLine()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpParser] enter
> > HttpParser.readRawLine()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpMethodBase] Closing the
> connection.
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.close()
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.closeSockedAndStreams()
> > 
> >  INFO [org.apache.commons.httpclient.HttpMethodBase] Recoverable exception
> > caught when processing request
> > 
> >  WARN [org.apache.commons.httpclient.HttpMethodBase] Recoverable exception
> > caught but MethodRetryHandler.retryMethod() returned false, rethrowing
> > exception
> > 
> > DEBUG [org.apache.commons.httpclient.HttpConnection] enter
> > HttpConnection.releaseConnection()
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > enter HttpConnectionManager.releaseConnection(HttpConnection)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > Freeing connection, hostConfig=HostConfiguration[host=sle,
> protocol=http:80,
> > port=80]
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
> > 
> > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
> > Notifying no-one, there are no waiting threads
> > 
> > ERROR [ISA] [sisa.SisaHttpConnector] HttpException during doHttpPost
> > java.net.SocketTimeoutException: Read timed out
> > 
> >  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> -
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


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


Mime
View raw message