RE: Premature EOF / Broken Pipe

2009-07-25 Thread Jerome Louvel
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

Re: Premature EOF / Broken Pipe

2009-07-15 Thread Timothy Aanerud
Several days of over night testing showed that my application would still
intermittently fail.  Switching the order of the messages just reduced the
incident rate.
--
Timothy.

On Wed, Jul 1, 2009 at 1:52 PM, Timothy Aanerud
taane...@aticonsulting.comwrote:

 ...

 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.




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

Re: Premature EOF / Broken Pipe

2009-07-15 Thread Timothy Aanerud
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.comwrote:

  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
 Noelios Technologies ~ Co-founder ~ 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 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
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com





 *De :* Timothy Aanerud 
 [mailto:taanerudATaticonsulting.comtaane...@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

RE: Premature EOF / Broken Pipe

2009-07-05 Thread Jerome Louvel
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=4447dsMessageId=23635 
dsMessageId=23635
62

--

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

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

Re: Premature EOF / Broken Pipe

2009-07-01 Thread Timothy Aanerud
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 taane...@aticonsulting.com



 On Mon, Jun 29, 2009 at 2:57 AM, Jerome Louvel 
 jerome.lou...@noelios.comwrote:

  Hi Timothy,



 Were you able to make progress on this front?



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





 *De :* Timothy Aanerud 
 [mailto:taanerudATaticonsulting.comtaane...@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.comtaane...@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=4447dsMessageId=23635
 62

 --


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






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

RE: Premature EOF / Broken Pipe

2009-06-29 Thread Jerome Louvel
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: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 experiement, 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: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=4447dsMessageId=23635 
dsMessageId=23635
62

--

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

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

Re: Premature EOF / Broken Pipe

2009-06-29 Thread Timothy Aanerud
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
taane...@aticonsulting.com


On Mon, Jun 29, 2009 at 2:57 AM, Jerome Louvel jerome.lou...@noelios.comwrote:

  Hi Timothy,



 Were you able to make progress on this front?



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





 *De :* Timothy Aanerud [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 experiement, 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: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=4447dsMessageId=23635
 62

 --


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




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

Premature EOF / Broken Pipe

2009-06-19 Thread Timothy Aanerud
Hi,
I'm having a communications problem between a client/server application both 
using Restlet 1.1.1 (and since upgraded to 1.1.5).  The client and server are 
both running on Fedora 10, OpenJDK-6 build 14.

The client posts a status resource message to the server to exchange status 
information at regular intervals.   The message send works most of the time.  
But, some times I'll get an exception on both the server and client side.  

The client side throws a Premature EOF IOException while trying to parse the 
response entity as Sax; while the server side sees an IOException with the 
message Broken Pipe.  (stack traces are attached using Restlet 1.1.1)

If the client sends the status resource message once every three minutes, I'll 
hardly ever get this exception pair.  If I send it every 10 seconds, the error 
rate is ~ 3%.  At 5 second intervals, the error rate is in the 25-50% range.

I was first seeing this error going over a wide area connection, but the error 
will occur on my local area network too.

I upgraded to Restlet-1.1.5 from 1.1.1 but that didn't help. :-(

Could HTTP caching be biting me here? The POST data doesn't change much from 
message to message.

I'm running out of ideas as to what to look at next for the cause of this 
problem.INFO: Starting the HTTP client
Jun 18, 2009 7:54:02 AM com.noelios.restlet.http.HttpClientCall 
getResponseEntity
INFO: The length of the message body is unknown. The entity must be handled 
carefully and consumed entirely in order to surely release the connection.
ERROR:  'Premature EOF'
javax.xml.transform.TransformerException: java.io.IOException: Premature EOF
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:724)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
at 
org.restlet.resource.SaxRepresentation.parse(SaxRepresentation.java:189)
at 
com.atilabs.rtikiosk.server.StatusResponseHandler.init(StatusResponseHandler.java:24)
at 
com.atilabs.rtikiosk.server.StatusTransaction.parseResponse(StatusTransaction.java:48)
at com.atilabs.rtikiosk.server.Server$1.run(Server.java:122)
Caused by: java.io.IOException: Premature EOF
at 
sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:556)
at 
sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:600)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:687)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at 
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2411)
at 
com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2915)
at 
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:302)
at 
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1719)
at 
com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1469)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1373)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:624)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:486)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:810)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:740)
at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:110)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:641)
at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:712)
... 5 more
-
java.io.IOException: Premature EOF
at 
sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:556)
at 
sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:600)
at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:687)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at 
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2411)
at 
com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2915)
at 
com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:302)
at 

RE: Premature EOF / Broken Pipe

2009-06-19 Thread Timothy Aanerud
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=4447dsMessageId=2363562