Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Broken Pipe Problem

  1. #1
    Join Date
    Apr 2009
    Posts
    1

    Default Broken Pipe Problem

    We are using jboss and pentaho classic reporting enging 0.8.9 to generate a pdf view of our invoice web pages.

    The flow for pdf report creation is as follows (jsf page --> backing bean --> servlet --> pop up dialog to view/save the pdf file)

    While running our test cases using selenium we get this following exception trace - however it happens randomly and not always. This happens just after the link to view the pdf report is clicked.

    ------------------------------------------------------------------------------------------------------------
    2009-04-09 15:42:06,692 ERROR [JCommon.log@70] 4623075: Report processing failed.
    2009-04-09 15:42:06,693 ERROR [JCommon.log@95] Writing PDF failed.
    org.jfree.report.ReportProcessingException: Failed to process the report
    at org.jfree.report.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1138)
    at org.jfree.report.modules.output.pageable.pdf.PdfReportUtil.createPDF(PdfReportUtil.java:121)
    at com.advancestores.commercialWebShop.web.OrderQuoteReportServlet.doGet(OrderQuoteReportServlet.java:123)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    ParentException:
    ExceptionConverter:
    ClientAbortException: java.net.SocketException: Broken pipe
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.lowagie.text.pdf.OutputStreamCounter.flush(OutputStreamCounter.java:92)
    at com.lowagie.text.DocWriter.close(DocWriter.java:310)
    at com.lowagie.text.pdf.PdfWriter.close(PdfWriter.java:1376)
    at com.lowagie.text.pdf.PdfDocument.close(PdfDocument.java:957)
    at com.lowagie.text.Document.close(Document.java:517)
    at org.jfree.report.modules.output.pageable.pdf.internal.PdfDocumentWriter.close(PdfDocumentWriter.java:263)
    at org.jfree.report.modules.output.pageable.pdf.PdfOutputProcessor.processingContentFinished(PdfOutputProcessor.java:114)
    at org.jfree.report.layout.output.AbstractOutputProcessor.processingFinished(AbstractOutputProcessor.java:100)
    at org.jfree.report.modules.output.pageable.base.PageableRenderer.performPagination(PageableRenderer.java:195)
    at org.jfree.report.layout.AbstractRenderer.processPage(AbstractRenderer.java:579)
    at org.jfree.report.layout.output.AbstractReportProcessor.processPage(AbstractReportProcessor.java:1024)
    at org.jfree.report.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1116)
    at org.jfree.report.modules.output.pageable.pdf.PdfReportUtil.createPDF(PdfReportUtil.java:121)
    at com.advancestores.commercialWebShop.web.OrderQuoteReportServlet.doGet(OrderQuoteReportServlet.java:123)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)
    at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124)
    at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)
    at org.apache.coyote.Response.doWrite(Response.java:560)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
    ... 42 more

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

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    BrokenPipe happens when the client (or the server via connection-timeouts) closes the connection before the full content has been written. Usually, this is a sign that your processing took too long. Increase the timeouts or restructure your reports.

    However, it could also be that your tests just overload the server (especially when running too many load tests on a too small machine) and thus the reporting engine would be able to create the reports in time, but never gets the chance as it does not get called until its almost too late. For small content sizes, we wont try to write the generated PDF until the processing is finished and the generated content is flushed. So even if the socket has been closed ages ago, we would still generate the report and would not see the uselessness of it until we call flush() at the end - when we get the crash.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3

    Default

    Hi folks,

    I got a similar problem.
    Using PRD3.5GA, testing a new report(which includes like 6 subreports), i noticed that the result obtained previewing a query was not the same than the one previewing the whole report.
    At the same query:
    -query preview -> 233699
    -report preview -> 16
    Taking in account PRD has no logs i published this report to server and generated the pdf via PUC. Then I realized I got a 'broken pipe' error there, looking at catalina.out.
    I'm clueless about how to fix it.

    If I reduce the current report to the minimum expression (a single subreport), the error persists. Same behaviour: query preview seems to show fine, but report preview fails miserably (numbers get reduced dramatically).

    I've unfortunately noticed that I have other report which imply bigger queries (resulting data) which don't fail, or at least, both query and report preview match result.
    At this point I don't know waht else to do.
    Last edited by hberges; 12-14-2009 at 08:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.