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 
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)
        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)
java.io.IOException: Couldn't parse the source representation: 
java.io.IOException: Premature EOF
        at 
org.restlet.resource.SaxRepresentation.parse(SaxRepresentation.java:197)
        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)
Jun 18, 2009 7:54:02 AM com.noelios.restlet.util.FormReader addParameters
WARNING: Unable to parse a form parameter. Skipping the remaining parameters.
java.io.IOException: Broken pipe
        at 
simple.http.MonitoredInputStream.destroy(MonitoredInputStream.java:198)
        at simple.http.MonitoredInputStream.read(MonitoredInputStream.java:92)
        at java.io.FilterInputStream.read(FilterInputStream.java:83)
        at java.io.FilterInputStream.read(FilterInputStream.java:83)
        at 
com.noelios.restlet.util.FormReader.readNextParameter(FormReader.java:218)
        at 
com.noelios.restlet.util.FormReader.addParameters(FormReader.java:129)
        at com.noelios.restlet.util.FormUtils.parse(FormUtils.java:240)
        at com.noelios.restlet.Engine.parse(Engine.java:979)
        at org.restlet.data.Form.<init>(Form.java:84)
        at org.restlet.data.Form.<init>(Form.java:133)
        at 
com.atilabs.rtiserver.StatusResource.acceptRepresentation(StatusResource.java:74)
        at org.restlet.resource.Resource.post(Resource.java:688)
        at org.restlet.resource.Resource.handlePost(Resource.java:537)
        at org.restlet.Finder.handle(Finder.java:357)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at 
com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
        at org.restlet.Application.handle(Application.java:341)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at org.restlet.Component.handle(Component.java:673)
        at org.restlet.Server.handle(Server.java:331)
        at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
        at 
com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
        at 
com.noelios.restlet.ext.simple.SimpleProtocolHandler.handle(SimpleProtocolHandler.java:75)
        at simple.http.Dispatcher.run(Dispatcher.java:83)
        at simple.util.process.Daemon.execute(Daemon.java:121)
        at simple.util.process.Daemon.run(Daemon.java:106)
Jun 18, 2009 7:54:02 AM com.noelios.restlet.LogFilter afterHandle
INFO: 2009-06-18        07:54:02        24.118.112.135  -       -       8183    
POST    /status/WI0001  -       200     -       76      60007   
https://wi.registration-technology.com:8183     Noelios-Restlet-Engine/1.1..1   
-

Reply via email to