Hi Timothy,

 

Let us know how it goes when using Jetty for example as the HTTP server 
connector. If you were using Tomcat, you might want to check this issue which 
might be related:

 

“getText() returns empty text with Tomcat”

http://restlet.tigris.org/issues/show_bug.cgi?id=843

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/> 
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/> 
http://www.noelios.com

 

 

 

De : Timothy Aanerud [mailto:taane...@aticonsulting.com] 
Envoyé : mercredi 15 juillet 2009 18:06
À : discuss@restlet.tigris.org
Objet : Re: Premature EOF / Broken Pipe

 

My real application is still the only place I can reproduce the problem.  While 
watching the client and server both run within Eclipse I can add one more 
observation about the order of events when the exceptions occur.

My client is POSTing a message to a resource.  When the problem occurs the 
client's call to  

{ new Client(Protocol.HTTP).post(url, representation) }

does not return for ~30 seconds.  The my client application does not throw an 
exception until after the server has thrown it's exceptions.

My server resource is receiving an acceptRepresentation call but is throwing an 
exception because the Representation entity it receives has a problem of some 
sort.  It's attempting to create a new Form(entity).  When it throws it's first 
exception.  The form is only partially parsed because of a java.io.IOException: 
Broken pipe.    The resource then attempts to use the incomplete form object, 
throws a few more exceptions that are caught.

Watching it happen I'd say that the server exceptions have all occured before 
the client throws it's Premature EOF exception.

Jerome's initial suggestion to my problem was to try different http connectors. 
  I initially didn't realize how easy that was to do until I saw an old  
posting from Thierry refering to these links.
http://www.restlet.org/documentation/1.1/faq#04 & 
http://www.restlet.org/documentation/1.1/faq#05
Just change the class path.  I didn't realize it was that easy. :-)

My first change was to switch my client to the Apache httpclient.  I'm going to 
run my client over night and see if I have any errrors.
--
Timothy Aanerud



On Sun, Jul 5, 2009 at 6:27 AM, Jerome Louvel <jerome.lou...@noelios.com> wrote:

Hi Timothy,

 

Thanks for updating us. Let’s keep an eye on it and if you find a way to 
reproduce it, please let us know!

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/> 
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/> 
http://www.noelios.com

 

 

 

De : Timothy Aanerud [mailto:taane...@aticonsulting.com] 
Envoyé : mercredi 1 juillet 2009 20:53
À : discuss@restlet.tigris.org


Objet : Re: Premature EOF / Broken Pipe

 

I tried adding a second resource to my sample application.  But it doesn't fail.

In my actual application I have a scheduled background thread doing a POST 
transaction, immediately followed by a GET transaction. The Premature EOF 
exception has always occurred in the POST transaction.  Since order does not 
matter between these two message exchanges, I switched them around.  After 
doing this and trying several different scheduled time intervals for the 
background thread, I have yet to see it fail using the 
org.restlet.Client.Client using org.restlet.data.Protocol.HTTP or 
Protocol.HTTPS.

I can't say "problem solved" but this is interesting and confusing at the same 
time.
--
Timothy Aanerud

On Mon, Jun 29, 2009 at 9:18 AM, Timothy Aanerud <tannerudATaticonsulting.com> 
wrote:

I haven't tried switching HTTP connectors. :-(

But, I did build a sanitized/stripped down example.  Unfortunately, my example 
does not fail like my application does.   One difference between my example is 
I'm only exchange data with one resource, In my actual application I'm sending 
two messages to two resources back-to-back before pausing.
--
Timothy Aanerud
taanerudataticonsulting.com <mailto:taane...@aticonsulting.com> 

 

On Mon, Jun 29, 2009 at 2:57 AM, Jerome Louvel <jerome.lou...@noelios.com> 
wrote:

Hi Timothy,

 

Were you able to make progress on this front? 

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/> 
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/> 
http://www.noelios.com

 

 

De : Timothy Aanerud [mailto:taanerudATaticonsulting.com 
<mailto:taane...@aticonsulting.com> ] 
Envoyé : vendredi 19 juin 2009 22:05


À : discuss@restlet.tigris.org

Objet : Re: Premature EOF / Broken Pipe

 

No, I haven't tried switching HTTP connectors. I get the same failures for both 
HTTP and HTTPS.
In another experiment, I changed the client message frequency to ~1 second 
intervals and at this rate on both
Windows XP and Fedora10/Linux show now problems with the server running on 
Fedora.

The various frequencies and failure rates: 
1 second == no problems
1.5 seconds == ~25% failure rate
5 seconds == ~25% failure rate
10 seconds == ~3% failure rate
180 seconds == >0.5%, if any failures

I'll switch the HTTP connectors out one at a time and see what happens.
--
Timothy Aanerud

On Fri, Jun 19, 2009 at 2:02 PM, Jerome Louvel <jerome.lou...@noelios.com> 
wrote:

Hi Timothy,

This looks like a bug to me. Have you tried with different Restlet HTTP
connectors (such as Jetty on the server-side and Apache HTTP client)?

If you could send us a simple standalone test case, we could easily debug
what's going bad.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder~ http://www.noelios.com


-----Message d'origine-----
De: Timothy Aanerud [mailto:taanerudATaticonsulting.com 
<mailto:taane...@aticonsulting.com> ]

Envoy頺 vendredi 19 juin 2009 18:18


: discuss@restlet.tigris.org
Objet: RE: Premature EOF / Broken Pipe


As a test, I moved the client code to a Windows XP machine. With a five
second update rate it fails regularly too, with the same exceptions and
stack traces.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23635> 
&dsMessageId=23635
62

------------------------------------------------------

http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 
<http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2363638>
 &dsMessageId=2363638

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2375512

Reply via email to