@JFinal 你好,想跟你请教个问题:我系统采用jfinal+beetl的架构,环境是centos系统,总是不定时的报Broken pipe问题,详细报错如下
ClientAbortException: java.net.SocketException: Connection reset
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:364)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:326)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:101)
at org.bee.tl.core.io.ByteWriter_Byte.flush(ByteWriter_Byte.java:91)
at org.bee.tl.core.CoreScriptRunner.runScript(CoreScriptRunner.java:226)
at org.bee.tl.core.BeeTemplate.getTextByByteWriter(BeeTemplate.java:201)
at org.bee.tl.ext.IncludeFileTemplateTag.makeOutput(IncludeFileTemplateTag.java:117)
at org.bee.tl.core.GeneralBeetlTag.getOutputAsByte(GeneralBeetlTag.java:74)
at org.bee.tl.core.CoreScriptRunner.parseTag(CoreScriptRunner.java:848)
at org.bee.tl.core.CoreScriptRunner.print(CoreScriptRunner.java:368)
at org.bee.tl.core.CoreScriptRunner.print(CoreScriptRunner.java:245)
at org.bee.tl.core.CoreScriptRunner.runScript(CoreScriptRunner.java:205)
at org.bee.tl.core.BeeTemplate.getTextByByteWriter(BeeTemplate.java:201)
at org.bee.tl.core.AbstractTemplate.getText(AbstractTemplate.java:80)
at org.bee.tl.ext.jfinal.BeetlRender.render(BeetlRender.java:102)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:92)
at com.wyf.handler.GetPostSameNameHandler.handle(GetPostSameNameHandler.java:16)
at com.wyf.handler.DruidStatViewHandler.handle(DruidStatViewHandler.java:58)
at com.wyf.handler.HtmlExtensionHandler.handle(HtmlExtensionHandler.java:16)
at com.jfinal.ext.handler.ContextPathHandler.handle(ContextPathHandler.java:47)
at com.wyf.handler.SessionHandler.handle(SessionHandler.java:19)
at com.wyf.handler.GetVistInfoHandler.handle(GetVistInfoHandler.java:44)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
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:222)
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:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:790)
at org.apache.coyote.Response.action(Response.java:173)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:359)
... 38 more
ClientAbortException: java.net.SocketException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:364)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:326)
at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:101)
at org.bee.tl.core.io.ByteWriter_Byte.flush(ByteWriter_Byte.java:91)
at org.bee.tl.core.CoreScriptRunner.runScript(CoreScriptRunner.java:226)
at org.bee.tl.core.BeeTemplate.getTextByByteWriter(BeeTemplate.java:201)
at org.bee.tl.core.AbstractTemplate.getText(AbstractTemplate.java:80)
at org.bee.tl.ext.jfinal.BeetlRender.render(BeetlRender.java:102)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:92)
at com.wyf.handler.GetPostSameNameHandler.handle(GetPostSameNameHandler.java:16)
at com.wyf.handler.DruidStatViewHandler.handle(DruidStatViewHandler.java:58)
at com.wyf.handler.HtmlExtensionHandler.handle(HtmlExtensionHandler.java:16)
at com.jfinal.ext.handler.ContextPathHandler.handle(ContextPathHandler.java:47)
at com.wyf.handler.SessionHandler.handle(SessionHandler.java:19)
at com.wyf.handler.GetVistInfoHandler.handle(GetVistInfoHandler.java:44)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
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:222)
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:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:790)
at org.apache.coyote.Response.action(Response.java:173)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:359)
... 31 more
tomcat版本多少?
你自己在这个环境测试的时候,比如多次访问页面,发现有没有错误?如果没有错误且页面显示正常,那我觉得这应该是互联网出现这个错误很正常,比如用户访问某个页面,在页面未完全渲染结束前离开导致的,beetl对于这种IO异常应该是可以忽略而无须抛到应用程序那儿,我可以重新发布一个忽略clientioexception给你,你看看
@闲.大赋 tomcat6.0的版本,jdk也是安装1.6的我也碰到给问题, @莫莫水心没有啊那你怎么解决的? http://lya041.blog.51cto.com/337966/667284NeverThrowClientRestWriter实现方式类似BufferedWriter,功能仅仅阻止客户端连接异常
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。