我在tomcat 5.5服务器上托管了一个示例项目,该项目使用JDBC连接到MSSQL R2数据库。但随机而且经常我得到一个ClientAbortException并且我的应用程序崩溃了。我能做什么?调试没有帮助,因为我无法重现错误:
堆栈跟踪 错误〜
@698gd0b9n
Internal Server Error (500)
Oops: ClientAbortException
An unexpected error occured caused by exception ClientAbortException: null
play.exceptions.UnexpectedException: Unexpected Error
at play.Invoker$Invocation.onException(Invoker.java:244)
at play.Invoker$Invocation.run(Invoker.java:286)
at play.server.ServletWrapper$ServletInvocation.run(ServletWrapper.java:548)
at play.Invoker.invokeInThread(Invoker.java:68)
at play.server.ServletWrapper.service(ServletWrapper.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:370)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:352)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:396)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:385)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:83)
at play.server.ServletWrapper.copyResponse(ServletWrapper.java:493)
at play.server.ServletWrapper$ServletInvocation.execute(ServletWrapper.java:558)
at play.Invoker$Invocation.run(Invoker.java:278)
... 18 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:751)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:774)
at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:584)
at org.apache.coyote.Response.doWrite(Response.java:560)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:365)
... 26 more
答案 0 :(得分:2)
我遇到了类似的问题,但使用的是Play-1.2.3 / Tomcat 6 / H2数据库
我从来没有真正了解问题的根源,但是通过修改我们的部署过程并确保在更换war文件之前完全停止Tomcat来解决问题。
我还必须在第一次重新启动Tomcat之前删除所有Tomcat临时文件。
这必须与Tomcat尝试热插拔war文件和播放没有正确关闭其资源有关,但在找到有效的解决方法后我停止了调查。
我发现框架中没有处理一些异常,导致错误消息和记录的异常与实际问题无关。
这个答案可能不在stackoverflow标准中(我不确定它是否是同一个问题而我只是提交了一个解决方法),但我觉得这个个人经历是相关的。如果我应该删除它,修改它或任何东西,请告诉我。
答案 1 :(得分:0)
对于Play 1.1.1 / Tomcat 7.082 /无数据库(使用jersey 2 REST的供稿)
我删除了Tomcat / temp和Tomcat / work / Catalina / localhost中的所有临时文件。
这为我解决了这个问题。