3 Replies Latest reply on Jun 26, 2012 4:25 PM by James Perkins

    Log Filter Bug?

    Chris Lydon Newbie

      Hi All,

       

      I have been trying to get log filtering working in JBOSS 7.1.1-Final (7.1.0 before that) and just can't seem to get it to work. I am trying to filter out the classic ClientAbortException and have tried it in both the handler and logger. I've tried changing the pattern to .*ClientAbortException.* as well as various other patterns to no avail. I have seen other examples of people setting up logs exactly like this but for whatever reason, it doesn't work for me.

       

      What am I doing wrong?

       

       

      In the handler it looks like this:

      {code:xml}

      <periodic-rotating-file-handler name="FILE">

          <level name="DEBUG"/>

          <filter>

              <not>

                  <match pattern="ClientAbortException"/>

              </not>

          </filter>

          <formatter>

              <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

          </formatter>

          <file relative-to="jboss.server.log.dir" path="server.log"/>

          <suffix value=".yyyy-MM-dd"/>

          <append value="true"/>

      </periodic-rotating-file-handler>

       

      {code}

       

       

      As a logger I had this:

      {code:xml}

      <logger category="javax.enterprise.resource.webcontainer.jsf.application">

          <level name="WARN"/>

          <filter>

              <not>

                  <match pattern="ClientAbortException"/>

              </not>

          </filter>

      </logger>


      {code}

       

       

      The stack trace I'm trying to filter out is this:

      {code}

      09:46:33,182 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (http--0.0.0.0-8080-1) : ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error

        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:403) [jbossweb-7.0.13.Final.jar:]

        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:449) [jbossweb-7.0.13.Final.jar:]

        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:426) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:415) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89) [jbossweb-7.0.13.Final.jar:]

        at java.nio.channels.Channels$WritableByteChannelImpl.write(Channels.java:296) [rt.jar:1.6.0_31]

        at com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:283) [jsf-impl-2.1.7-jbossorg-2.jar:]

        at javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:125) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

        at org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:99) [primefaces-3.2.jar:]

        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:591) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

        at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) [primefaces-3.2.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

        at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

        at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) [prettyfaces-jsf2-3.3.3.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

      Caused by: java.net.SocketException: Software caused connection abort: socket write error

        at java.net.SocketOutputStream.socketWrite0(Native Method) [rt.jar:1.6.0_31]

        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) [rt.jar:1.6.0_31]

        at java.net.SocketOutputStream.write(SocketOutputStream.java:136) [rt.jar:1.6.0_31]

        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:724) [jbossweb-7.0.13.Final.jar:]

        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:449) [jbossweb-7.0.13.Final.jar:]

        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:748) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:559) [jbossweb-7.0.13.Final.jar:]

        at org.apache.coyote.Response.doWrite(Response.java:594) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:398) [jbossweb-7.0.13.Final.jar:]

        ... 37 more

      {code}

        • 1. Re: Log Filter Bug?
          James Perkins Master

          Both of those should work. I tested with replacing the pattern to JBAS and it seemed to work for me. Do you have an example application by chance that would create that exception?

           

          --

          James R. Perkins

          • 2. Re: Log Filter Bug?
            Chris Lydon Newbie

            Hi James, thanks for your response.

             

            My app is a JSF app using Primefaces 3.3 but from what I've seen it seems to happen pretty consistantly if I request a page that includes some images/css/js with IE9 immediately after JBOSS starts up. I suppose you could also just throw the exception manually in your code.

            • 3. Re: Log Filter Bug?
              James Perkins Master

              Hello Chris,

              I think I might have figured it out. The exception being logged isn't part of the message from the log record. This means it's not checked by the filter, therefore the message isn't filtered out.

               

              In this particular case I can't really think of a good way to filter out this message. It might be best to get to the bottom of what's causing the error. Not that I have any idea what that could be :-)

               

              --

              James R. Perkins

              1 of 1 people found this helpful