Announcement Announcement Module
Collapse
No announcement yet.
Connection => java.net.SocketException: Broken pipe Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection => java.net.SocketException: Broken pipe

    Dear all,

    Good morning, I have an application which uses the Spring framework with Hibernate to manage an Oracle database. All is fine except that with the time, I have a big big logs file on my WebLogic Server once a user closes his browser or stops a request !!! At every turn, I receive a :

    java.net.SocketException: Broken pipe

    This log file can be very important at the end, and eventually I could have some damages...

    I searched in a lot of web pages but I didn't find anything : properties on hibernate side, on weblogic side....nothing works, I'm lost !!!

    Here is an extract of my log file (stderr.log) :

    SEVERE: Can't insert page '/jsp/pages/standardReview.jsp' : Broken pipe
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutp utStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStre am.java:136)
    at weblogic.servlet.internal.ChunkUtils.writeChunkTra nsfer(ChunkUtils.java:247)
    at weblogic.servlet.internal.ChunkUtils.writeChunks(C hunkUtils.java:223)
    at weblogic.servlet.internal.ChunkOutput.flush(ChunkO utput.java:298)
    at weblogic.servlet.internal.ChunkOutput.checkForFlus h(ChunkOutput.java:373)
    at weblogic.servlet.internal.ChunkOutput.print(ChunkO utput.java:258)
    at weblogic.servlet.internal.ChunkOutputWrapper.print (ChunkOutputWrapper.java:126)
    at weblogic.servlet.jsp.JspWriterImpl.print(JspWriter Impl.java:282)
    at jsp_servlet._jsp._pages.__standardreview._writeTex t(__standardreview.java:76)
    at jsp_servlet._jsp._pages.__standardreview._jspServi ce(__standardreview.java:1586)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java: 33)


    Anyone has any idea ?

    Best regards,
    Franck

  • #2
    Whats Your problem? Do You want to stop the logging of this exception?
    Have a look on http://e-docs.bea.com/wls/docs81/log...g.html#1178165
    perhaps this will help.

    MfG Mirko

    Comment


    • #3
      Thanks for your response,

      Yes exactly, I would like to stop the logging of this exception !

      I'm reading your document...

      Regards,

      Comment


      • #4
        Not so easy...

        Did you try to implement this filter ?

        Comment


        • #5
          Re: Connection => java.net.SocketException: Broken pipe

          Originally posted by anel69ka
          Not so easy...

          Did you try to implement this filter ?
          Yes and yes :wink:

          We had to cut down some messages about rolled back MDB-Transactions.
          Here is what I did (sorry for the german Javadoc):
          Code:
          package xyz;
          
          import java.util.logging.Handler;
          import java.util.logging.LogRecord;
          import java.util.logging.Logger;
          import java.util.logging.Level;
          import java.util.logging.Filter;
          
          import weblogic.logging.LoggingHelper;
          import weblogic.logging.WLLogRecord;
          
          /**
           * Diese Klasse ermöglicht das setzen von Filtern auf das
           * BEA-Server/-Domain-Log.
           * http://e-docs.bea.com/wls/docs81/logging/filtering.html#1178165
           * 
           * @author mzeibig
           * @see weblogic.logging.LoggingHelper
           * @see java.util.logging.Filter
           */
          public class BEALogFilter {
          
              /**
               * Revisionsnummer. 
               */
              public static final String CVS_REV = "$Revision: $";
              
              /**
               * CVS-Id.
               */
              public static final String CVS_ID = "$Id: $";
          
              /**
               * Setzt einen Filter für das BEA-Server-Log für EJB-Ausgaben, mit dem Level
               * Info. Nach aufruf dieser Methode werden keine EJB-Logausgaben mit dem
               * Level Info mehr geschrieben. Dies ist nötig, da ansonsten für jedes
               * Rollback ein Logeintrag geschrieben wird. Im Fall von nicht erfolgreich
               * verschickten Mails, die zurück in die JMS-Queue gestellt werden, würden
               * ansonsten sehr viele Einträge erfolgen.
               */
              public void setEJBInfoFilter() {
                  Logger serverlogger = LoggingHelper.getServerLogger();
                  serverlogger.setFilter(new ServerlogFilter());
              }
          
              /**
               * Eine spezielle Filterimplementierung, die für alle Logversuche des
               * BEA-Servers überprüft, ob es sich um EJB-Logging mit dem Level Info
               * handelt. Ist dies der fall, wird das Logging verhindert.
               * 
               * <pre>
               * 
               *  Aufbau eines Logeintrages&#58; 
               *   
               *    ####<17.01.2005 14.57 Uhr CET&gt; <Info&gt; <EJB&gt; <xxxxxxx&gt; <myserver&gt; <ExecuteThread&#58; '13' for queue&#58; 'weblogic.kernel.Default'&gt; <weblogic&gt; <&gt; <BEA-010213&gt; <Message-Driven EJB&#58; MailVersandEJB's transaction was rolledback. The transaction details are&#58; Xid=BEA1-001FA942778B7F28EDB9&#40;11047935&#41;,Status=Rolled back. &#91;Reason=weblogic.transaction.internal.AppSetRollbackOnlyException&#93;,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=30,XAServerResourceInfo&#91;JMS_FileStore&#93;=&#40;ServerResourceInfo&#91;JMS_FileStore&#93;=&#40;state=rolledback,assigned=myserver&#41;,xar=JMS_FileStore,re-Registered = false&#41;,SCInfo&#91;mydomain+myserver&#93;=&#40;state=rolledback&#41;,OwnerTransactionManager=ServerTM&#91;ServerCoordinatorDescriptor=&#40;CoordinatorURL=myserver+xxx.xx.xx.xx&#58;7001+mydomain+t3+, XAResources=&#123;&#125;,NonXAResources=&#123;&#125;&#41;&#93;,CoordinatorURL=myserver+xxx.xx.xx.xx&#58;7001+mydomain+t3+&#41;.&gt; 
               *                                      &circ;     &circ;       &circ;         &circ;                                 &circ;                                   &circ;       &circ;      &circ;            &circ;
               *                                      |     |       |         |                                 |                                   |       |      |            |
               *                                      |     |       |         |                                 +--ThreadName                       |       |      +--Id        +--Message
               *                                      |     |       |         |                                                                     |       |      
               *                                      |     |       |         |                                                                     |       +--TransactionId&#40;?&#41;
               *                                      |     |       |         +--ServerName                                                         |
               *                                      |     |       |                                                                               +--UserId
               *                                      |     |       +--MachineName
               *                                      |     |
               *                                      |     +--LoggerName
               *                                      |
               *                                      +--Level
               *    
               *   
               *  
               * </pre>
               * 
               * @author mzeibig
               */
              private static class ServerlogFilter implements Filter &#123;
          
                  /**
                   * Liefert <code>false</code>, wenn es sich um EJB-Logs mit Level
                   * Info handelt.
                   * 
                   * @param record
                   *            der zu prüfende Logeintrag
                   * @return true, wenn Logging erfolgen soll, sonst false
                   * @see java.util.logging.Filter#isLoggable&#40;java.util.logging.LogRecord&#41;
                   */
                  public boolean isLoggable&#40;LogRecord record&#41; &#123;
                      if &#40;record instanceof WLLogRecord&#41; &#123;
                          WLLogRecord rec = &#40;WLLogRecord&#41; record;
                          if &#40;&#40;rec.getLoggerName&#40;&#41;.equals&#40;"EJB"&#41;&#41;
                                  && &#40;rec.getLevel&#40;&#41;.equals&#40;Level.INFO&#41;&#41;&#41; &#123;
                              return false;
                          &#125; else &#123;
                              return true;
                          &#125;
                      &#125; else &#123;
                          return true;
                      &#125;
                  &#125;
              &#125;
          &#125;
          
          // $Log&#58; $
          You can call this code from a startup class or from a ServletContextListener.contextInitialized(..)

          MfG Mirko

          Comment

          Working...
          X