Broken Pipe exception

Discussion in 'Java' started by laredotornado, Oct 19, 2009.

  1. Hi,

    I'm using Java 1.5. What does a "broken pipe" exception mean in the
    context of parsing a file? Below is my code and the exception is
    generated on the "xmlReader.parse" line. Stack trace is below. Any
    ideas for troubleshooting further are appreciated. Thanks, - Dave


    GPGInputSource gpgInputSource =
    new GPGInputSource(new FileInputStream(file));
    try {
    InputStream inputStream =
    getInflatorStream(file.getName(), gpgInputSource.getInputStream
    ());
    xmlReader.parse(new InputSource(inputStream));
    } catch(AddressRequestLimitException e) {
    logger.error(e.getMessage(), e);
    } finally {
    if(gpgInputSource.close() != 0)
    logger.error(gpgInputSource.getStandardErrorString());
    if(gpgOutputSource.close() != 0)
    logger.error(gpgOutputSource.getStandardErrorString());
    }


    java.lang.RuntimeException: java.lang.RuntimeException: Broken Pipe!
    at
    myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
    (AddressRequestFileHandler.java:128)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement
    (Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement
    (Unknown Source)
    at
    org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
    Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
    $FragmentContentDispatcher.dispatch(Unknown Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
    (Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
    Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
    Source)
    at myco.dor.dmv.driver.youthful.xml.AddressFileUtility.lookup
    (AddressFileUtility.java:201)
    at myco.dor.dmv.driver.youthful.AddressFileProcessor.execute
    (AddressFileProcessor.java:178)
    at myco.dor.dmv.driver.youthful.AddressFileProcessor.main
    (AddressFileProcessor.java:82)
    Caused by: java.lang.RuntimeException: Broken Pipe!
    at
    myco.dor.dmv.driver.youthful.PhpAddressNormalizer.normalAddress
    (PhpAddressNormalizer.java:33)
    at
    myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
    (AddressRequestFileHandler.java:124)
    ... 12 more
     
    laredotornado, Oct 19, 2009
    #1
    1. Advertising

  2. laredotornado

    markspace Guest

    laredotornado wrote:
    > Hi,
    >
    > I'm using Java 1.5. What does a "broken pipe" exception mean in the
    > context of parsing a file? Below is my code and the exception is



    It means "IO Error," basically. Something external to the process
    closed or stopped the connection.

    > generated on the "xmlReader.parse" line. Stack trace is below. Any
    > ideas for troubleshooting further are appreciated. Thanks, - Dave



    Google "broken pipe socket" to get some ideas what might be going on.
    Basically you have to troubleshoot the network or the system, not the app.

    Could be:

    1. Network time out
    2. CPU limit (time waiting/processing)
    3. Other side closes connection/times out
    4. Other local/remote network failure
    5. Sunspots
    6. ... other....
     
    markspace, Oct 19, 2009
    #2
    1. Advertising

  3. laredotornado wrote:

    > I'm using Java 1.5. What does a "broken pipe" exception mean in the
    > context of parsing a file?


    The message and type of the Exception comes from your own code:
    > java.lang.RuntimeException: java.lang.RuntimeException: Broken Pipe!
    > at
    > myco.dor.dmv.driver.youthful.xml.AddressRequestFileHandler.endElement
    > (AddressRequestFileHandler.java:128)


    so you might check there what can cause this.


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
     
    Lothar Kimmeringer, Oct 19, 2009
    #3
  4. laredotornado

    Roedy Green Guest

    On Mon, 19 Oct 2009 10:28:08 -0700 (PDT), laredotornado
    <> wrote, quoted or indirectly quoted someone
    who said :

    >Caused by: java.lang.RuntimeException: Broken Pipe!


    see http://mindprod.com/jgloss/runerrormessages.html#BROKENPIPE
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Nothing is so good as it seems beforehand.
    ~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)
     
    Roedy Green, Oct 20, 2009
    #4
  5. laredotornado

    EJP Guest

    Roedy Green wrote:
    >
    >> Caused by: java.lang.RuntimeException: Broken Pipe!

    >
    > see http://mindprod.com/jgloss/runerrormessages.html#BROKENPIPE


    All the explanations there are wrong. What this error means is that the
    process reading the pipe has closed it, so you can't write more data to it.
     
    EJP, Oct 20, 2009
    #5
  6. laredotornado

    Roedy Green Guest

    On Tue, 20 Oct 2009 03:10:42 GMT, EJP
    <> wrote, quoted or indirectly quoted
    someone who said :

    >All the explanations there are wrong. What this error means is that the
    >process reading the pipe has closed it, so you can't write more data to it.


    Perhaps for this particular case. However if you google this error
    message you will find others have traced the error message to the
    causes mentioned.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Nothing is so good as it seems beforehand.
    ~ George Eliot (born: 1819-11-22 died: 1880-12-22 at age: 61) (Mary Ann Evans)
     
    Roedy Green, Oct 20, 2009
    #6
  7. laredotornado

    EJP Guest

    Roedy Green wrote:
    > if you google this error
    > message you will find others have traced the error message to the
    > causes mentioned.


    So you are assuming that everything on the Internet is true?

    'Broken pipe' corresponds to EPIPE/SIGPIPE which has the single cause I
    mentioned: 'EPIPE: An attempt is made to write to a pipe that is not
    open for reading by any process'.
     
    EJP, Oct 21, 2009
    #7
  8. EJP wrote:

    > So you are assuming that everything on the Internet is true?
    >
    > 'Broken pipe' corresponds to EPIPE/SIGPIPE


    Sorry to say that, but all the "broken pipe" messages I've seen
    so far were lower case. In the OP we have a "Broken Pipe!" so
    this message comes from different class than the usual.

    As well, no sockets are used here but a FileInputStream, so
    this message could come from GPGInputSource or one of the
    classes the OP was implementing by himself.

    So without further knowledge of the origin of this message
    (and the RuntimeException being thrown instead of an IOException)
    as I asked yesterday, it's just pure guessing.


    Regards, Lothar
    --
    Lothar Kimmeringer E-Mail:
    PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

    Always remember: The answer is forty-two, there can only be wrong
    questions!
     
    Lothar Kimmeringer, Oct 21, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. funtoosh

    how to detect broken pipe ?

    funtoosh, Dec 20, 2003, in forum: Perl
    Replies:
    1
    Views:
    914
    Ben Morrow
    Dec 21, 2003
  2. Clive
    Replies:
    0
    Views:
    3,008
    Clive
    Aug 12, 2003
  3. lee, wonsun
    Replies:
    1
    Views:
    490
    Jack Klein
    Nov 2, 2004
  4. aemi
    Replies:
    2
    Views:
    5,509
  5. Replies:
    1
    Views:
    226
    Ben Morrow
    Jun 2, 2004
Loading...

Share This Page