hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wee Tian Jou" <tj...@fairex.com>
Subject RE: HttpClient problems
Date Thu, 27 May 2004 16:06:50 GMT
Thanks a lot, I will go and check with the server admin guys.

Its not a authentication issue as this problem happens randomly. 
-----Original Message-----
From: "Kalnichevski, Oleg" <oleg.kalnichevski@bearingpoint.com>
To: "Commons HttpClient Project" <commons-httpclient-
dev@jakarta.apache.org>
Date: Thu, 27 May 2004 13:47:13 +0100
Subject: RE: HttpClient problems

> Paul,
> 
> The problem is obviously caused by the server's dropping connection
> right after HttpClient is done sending the request. If you have access
> to the target server, check the server logs to find out what prompted
> the server to do so.
> 
> I can think of two possibilities:
> 
> (1) The server did not accept the request due to an authentication
> error (wrong credentials and stuff), immediately sent back
> 'unauthorized' response and dropped the connection while HttpClient was
> still busy sending the request body. 
> 
> If unsuccessful authentication is indeed the cause of the problem you
> can solve it by activating the '100-continue' handshake. See
> EntityEnclosingMethod javadocs for details
> 
> (2) The server dropped the connection due to a very high load or any
> other reason preventing it from successfully processing the request.
> Server log file is your best friend in this case
> 
> Hope this helps
> 
> Oleg
> 
> -----Original Message-----
> From:	paul [mailto:tjwee@fairex.com]
> Sent:	Thu 5/27/2004 14:25
> To:	Commons HttpClient Project
> Cc:	
> Subject:	Re: HttpClient problems
> Here's the wire log :
> ==============================================================
> 2004/05/26 20:09:50:262 SGT [DEBUG] MultiThreadedHttpConnectionManager
> - 
> -HttpConnectionManager.getConnection:  config = HostConfiguration[hos
> t=somewhere.com, protocol=https:443, port=443], timeout = 0
> 2004/05/26 20:09:50:262 SGT [DEBUG] MultiThreadedHttpConnectionManager
> - 
> -Getting free connection, 
> hostConfig=HostConfiguration[host=somewhere.com, protocol=https:443, 
> port=443]
> 2004/05/26 20:09:50:263 SGT [DEBUG] HttpConnection - 
> -HttpConnection.setSoTimeout(0)
> 2004/05/26 20:09:50:270 SGT [DEBUG] HttpMethodBase - -Execute loop try
> 1
> 2004/05/26 20:09:50:280 SGT [DEBUG] wire - ->> "POST 
> /fxlweb/XMLGateway.asp HTTP/1.1[\r][\n]"
> 2004/05/26 20:09:50:281 SGT [DEBUG] HttpMethodBase - -Adding Host 
> request header
> 2004/05/26 20:09:50:282 SGT [DEBUG] wire - ->> "Content-type: text/xml;
> charset=ISO-8859-1[\r][\n]"
> 2004/05/26 20:09:50:283 SGT [DEBUG] wire - ->> "Authorization: Basic 
> someencrypteddata[\r][\n]"
> 2004/05/26 20:09:50:283 SGT [DEBUG] wire - ->> "HTTP-Version: 
> HTTP/1.1[\r][\n]"
> 2004/05/26 20:09:50:284 SGT [DEBUG] wire - ->> "Connection: 
> Keep-Alive[\r][\n]"
> 2004/05/26 20:09:50:285 SGT [DEBUG] wire - ->> "User-Agent: Jakarta 
> Commons-HttpClient/2.0final[\r][\n]"
> 2004/05/26 20:09:50:286 SGT [DEBUG] wire - ->> "Host:
> somewhere.com[\r][\n]"
> 2004/05/26 20:09:50:287 SGT [DEBUG] wire - ->> "Cookie: $Version=0; 
> ASPSESSIONIDAACRQATR=DKBJEFCAIKAHLGIMJKIBEGBH; $Path=/[\r][\n]"
> 2004/05/26 20:09:50:287 SGT [DEBUG] wire - ->> "Content-Length:
> 594[\r][\n]"
> 2004/05/26 20:09:50:288 SGT [DEBUG] wire - ->> "[\r][\n]"
> 2004/05/26 20:09:50:289 SGT [DEBUG] EntityEnclosingMethod - -Using 
> unbuffered request body
> 2004/05/26 20:09:50:290 SGT [DEBUG] wire - ->> "<?xml version="1.0" 
> encoding="UTF-8"?>xmldata here"
> 2004/05/26 20:09:50:290 SGT [DEBUG] EntityEnclosingMethod - -Request 
> body sent
> 2004/05/26 20:09:50:562 SGT [DEBUG] HttpMethodBase - -Closing the 
> connection.
> 2004/05/26 20:09:50:563 SGT [INFO] HttpMethodBase - -Recoverable 
> exception caught when processing request
> 2004/05/26 20:09:50:563 SGT [WARN] HttpMethodBase - -Recoverable 
> exception caught but MethodRetryHandler.retryMethod() returned false, 
> rethrow
> ing exception
> 2004/05/26 20:09:50:564 SGT [DEBUG] MultiThreadedHttpConnectionManager
> - 
> -Freeing connection, hostConfig=HostConfiguration[host=somewhere.com, 
> protocol=https:443, port=443]
> 2004/05/26 20:09:50:564 SGT [DEBUG] MultiThreadedHttpConnectionManager
> - 
> -Notifying no-one, there are no waiting threads
> org.apache.commons.httpclient.HttpRecoverableException: 
> java.net.SocketException: Connection reset
>         at 
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBas
> e.java:1965)
>         at 
> org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodB
> ase.java:2659)
>         at 
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.jav
> a:1093)
>         at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:
> 675)
>         at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:
> 529)
>        
> 
> =============================================================
> Thanks a lot for the info.
> 
> Ortwin Gl├╝ck wrote:
> 
> >
> >
> > paul wrote:
> >
> >> 2004/05/26 20:09:50:564 SGT [DEBUG] 
> >> MultiThreadedHttpConnectionManager - -Notifying no-one, there are no
> >> waiting threads
> >> org.apache.commons.httpclient.HttpRecoverableException: 
> >> java.net.SocketException: Connection reset
> >>      at 
> >>
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBas
> e.java:1965) 
> >>
> >>      at 
> >>
> org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodB
> ase.java:2659) 
> >
> >
> >
> >
> >> Does anybody know what causes the SocketException ? 
> >
> >
> > Not yet, but we're gonna find out for you :-)
> >
> > Please produce a wirelog and send the section with the request / 
> > response immediately preceding the exception.
> > For instructions about how to make a wirelog please see our Logging 
> > Guide:
> > http://jakarta.apache.org/commons/httpclient/logging.html
> >
> > Please note that wire logging will slow down your application 
> > considerably! This is escpecially bad, because the problem you are 
> > experiencing seems to happen randomly. Please make sure you disable 
> > logging after you have successfully captured the output.
> >
> >
> >> Is it becos I didn't
> >> set a higher maximum connection per host using 
> >> setMaxConnectionsPerHost on the MultiThreadedHttpConnectionManager 
> >> object ?
> >
> >
> > Probably not - just doesn't look like it.
> >
> >> Pls help. This is urgent as I am currently using it on a production 
> >> system.
> >
> >
> > You are welcome. Maybe we should start offering commercial support
> and 
> > make A LOT of money :-)
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> 
> 
> 
> 
> 
> 


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


Mime
View raw message