changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Suppress logging of ClientAbortException in WroFilter. #534

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When requesting wro/*.js or wro/*.css using browser, the following exception 
occurs on my web app with wro4j-core-1.4.8.1.jar.
But wro4j seems to work fine.
It works with apache-tomcat-7.0.29 and jdk1.7.0_05.

With wro4j-core-1.4.7.jar or before, I didn't see the exception.

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

2012-08-30 09:23:20,750 ERROR WroFilter - Error while chaining the request
ro.isdc.wro.WroRuntimeException: Unexected exception
    at ro.isdc.wro.http.WroFilter.onException(WroFilter.java:396)
    at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:326)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at bizlib.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:169)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: ClientAbortException:  java.net.SocketException: Software caused 
connection abort: socket write error
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:371)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:413)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:401)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:84)
    at org.apache.commons.io.IOUtils.write(IOUtils.java:1045)
    at ro.isdc.wro.manager.ResourceBundleProcessor.serveProcessedBundle(ResourceBundleProcessor.java:111)
    at ro.isdc.wro.manager.WroManager.process(WroManager.java:136)
    at ro.isdc.wro.http.WroFilter.processRequest(WroFilter.java:385)
    at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:321)
    ... 19 more
Caused by: java.net.SocketException: Software caused connection abort: socket 
write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
    at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
    at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:84)
    at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
    at org.apache.coyote.Response.doWrite(Response.java:504)
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:383)
    ... 29 more

Original issue reported on code.google.com by h.shiros...@gmail.com on 30 Aug 2012 at 12:45

GoogleCodeExporter commented 9 years ago
The real problem is this:
"Caused by: ClientAbortException:  java.net.SocketException: Software caused 
connection abort: socket write error"

This error message generally means that the end that reported the error tried 
to write data, but the other end has already closed the connection.

It can easily be reproduced by hitting F5 in browser in "hammer" mode. This 
problem is harmless for both: client and server and there little that can be 
done, unless you want to make those logs less verbose.. 

Closing the issue with WONTFIX resolution. Feel free to reopen it if you don't 
agree.

Original comment by alex.obj...@gmail.com on 30 Aug 2012 at 11:47

GoogleCodeExporter commented 9 years ago
Thank you for reply.

So I want to suppress logs since it's too verbose.
Is the following setting reasonable solution?

log4j.logger.ro.isdc.wro.http.WroFilter=FATAL

Original comment by h.shiros...@gmail.com on 30 Aug 2012 at 12:39

GoogleCodeExporter commented 9 years ago
I would recommend using:

log4j.logger.ro.isdc.wro.http.WroFilter=NONE

Btw, I can suppress that log in next release.
Will change the title and description of this issue.

Original comment by alex.obj...@gmail.com on 30 Aug 2012 at 12:42

GoogleCodeExporter commented 9 years ago
Fixed in branch 1.4.x

Original comment by alex.obj...@gmail.com on 30 Aug 2012 at 2:26

GoogleCodeExporter commented 9 years ago
Thank you for fix.

BTW `log4j.logger.ro.isdc.wro.http.WroFilter=NONE`
didn't work for me. Log output was not suppressed. DEBUG level log was also 
shown.

I'll use `log4j.logger.ro.isdc.wro.http.WroFilter=FATAL` for now.

Original comment by h.shiros...@gmail.com on 31 Aug 2012 at 1:27

GoogleCodeExporter commented 9 years ago
Issue 540 has been merged into this issue.

Original comment by alex.obj...@gmail.com on 6 Sep 2012 at 8:21