hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Unlocatable exception withinhttpclient.HttpRecoverableException
Date Wed, 06 Oct 2004 03:45:53 GMT
Hi Jeff,

Is it possible that you're using the same HttpConnection from more than  
one thread/method?  Is the same SimpleHttpConnectionManager being  
shared?

If not I would suggest disabling connection reuse.  This can usually be  
done by setting the following header on each method.

method.setRequestHeader("Connection", "close");

Mike

On Oct 5, 2004, at 6:05 PM, Jeff Fern wrote:

> Hello,
>
> Thank-you for your reply.  I do not believe that the errors can be  
> caused
> due to the server being overloaded - it is my desktop machine and the  
> only
> person accessing the web server is myself. Additionally, the machine  
> is not
> doing anything intensive (just running X, firefox and eclipse), it is  
> an
> Athlon 2800+ with 512MB RAM.
>
> The fact that I also get a socket closed message as well as "unable to  
> find
> line starting with "HTTP" is also confusing me :/
>
> Regards,
>
>
> -Jeff Fern
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:oleg.kalnichevski@bearingpoint.com]
> Sent: 05 October 2004 13:51
> To: Commons HttpClient Project
> Cc: Jeff Fern
> Subject: Re: Unlocatable exception  
> withinhttpclient.HttpRecoverableException
>
>
> Jeff,
>
> Sometimes, usually when under heavy load, the web server may be able to
> receive requests but unable to process them due to low resources (most
> commonly worker threads). In such a case the web server may simply  
> have no
> other choice but to drop the connection without sending back any status
> code. This in turn causes HttpClient to throw a  
> HttpRecoverableException
> "unable to find line starting with "HTTP""
>
> Can it be that you have been stressing the server a bit too much?
>
> Anyways, usually "unable to find line starting with "HTTP"" exception  
> is not
> a HttpClient fault, but that of the target server. The regrettable  
> thing
> about it it is a poor choice of exception class name and a misleading  
> error
> message. (This problem has already been fixed in HttpClient 3.0)
>
> Hope this helps a little
>
> Oleg
>
> On Tue, 2004-10-05 at 08:27, Jeff Fern wrote:
>> Hello all,
>>
>> I am running Tomcat 5.0.27 with Java 1.4.2 on my local machine (Debian
>> sarge). I have a Java webapp running on Tomcat, which outputs XML and
>> I am using Cocoon 2.1 to style the XML with a static XSLT stylesheet
>> to generate HTML.
>>
>> I have managed to generate an bug which occurs about 80% of the time.
>>
>> When I submit a form, cocoon generates one of a couple of errors:
>>
>> org.apache.cocoon.ProcessingException: There is a problem with the  
>> URI:
>>
>>
>> <http://127.0.0.1:8080/Conference/GetConference?conferenceName=UbiComp
>> %20200
>> 5>
>> http://127.0.0.1:8080/Conference/GetConference?conferenceName=UbiComp%
>> 202005
>> :
>>
>> org.apache.commons.httpclient.HttpRecoverableException:
>>
>> org.apache.commons.httpclient.HttpRecoverableException: Error in
>> parsing the status line from the response: unable to find line  
>> starting
> with "HTTP"
>>
>> or org.apache.cocoon.ProcessingException: There is a problem with the
>>
>> URI:  <http://127.0.0.1:8080/Conference/AddDetails>
>> http://127.0.0.1:8080/Conference/AddDetails:
>>
>> org.apache.commons.httpclient.HttpRecoverableException:
>>
>> java.net.SocketException: Socket closed
>>
>> Trying to re-submit the same information sometimes displays the
>> correct results, sometimes generates an error.
>>
>> I have enabled logging with log4j using the examples at
>> <http://jakarta.apache.org/commons/httpclient/logging.html>
>> http://jakarta.apache.org/commons/httpclient/logging.html The only
>> ouput generated in the log file is:
>>
>> - Recoverable exception caught when processing request
>>
>> - Recoverable exception caught but MethodRetryHandler.retryMethod()
>>
>> returned false, rethrowing exception
>>
>> I have also tried my code on Tomcat 5.5 with Java 1.5 and get the
>> exact same results.
>>
>> I am unable to locate any piece of my code that causes this error.
>>
>> Any help or suggestions would be much appreciated,
>>
>> Regards,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -Jeff Fern
>
> *********************************************************************** 
> *****
> ***********************
> The information in this email is confidential and may be legally  
> privileged.
> Access to this email by anyone other than the intended addressee is
> unauthorized.  If you are not the intended recipient of this message,  
> any
> review, disclosure, copying, distribution, retention, or any action  
> taken or
> omitted to be taken in reliance on it is prohibited and may be  
> unlawful.  If
> you are not the intended recipient, please reply to or forward a copy  
> of
> this message to the sender and delete the message, any attachments,  
> and any
> copies thereof from your system.
> *********************************************************************** 
> *****
> ***********************
>
>
> ---------------------------------------------------------------------
> 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