Tomcat localhost日志中有时会出现“java.net.SocketException:Connection reset”

时间:2011-04-19 07:06:04

标签: java tomcat socketexception

这似乎是一个着名的问题。但我找不到谷歌的简短回答。 我有很多客户端通过Apache代理服务器连接到Tomcat服务器。有时,我在tomcat的localhost日志中看到此错误。我想知道可能的原因。此时,连接被“重置”了?我对环境的访问受限,所以我无法使用工具来检查连接。

java.net.SocketException: Connection reset
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:573)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:293)
        at org.apache.catalina.connector.OutputBuffer.writeByte(OutputBuffer.java:399)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:77)
        at com.caucho.hessian.io.HessianOutput.printString(HessianOutput.java:898)
        at com.caucho.hessian.io.HessianOutput.writeString(HessianOutput.java:583)
        at com.caucho.hessian.io.JavaSerializer$StringFieldSerializer.serialize(JavaSerializer.java:412)
        at com.caucho.hessian.io.JavaSerializer.writeObject10(JavaSerializer.java:241)
        at com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:221)
        at com.caucho.hessian.io.HessianOutput.writeObject(HessianOutput.java:317)
        at com.caucho.hessian.io.ArraySerializer.writeObject(ArraySerializer.java:69)
        at com.caucho.hessian.io.HessianOutput.writeObject(HessianOutput.java:317)
        at com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
        at com.caucho.hessian.io.JavaSerializer.writeObject10(JavaSerializer.java:241)
        at com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:221)
        at com.caucho.hessian.io.ThrowableSerializer.writeObject(ThrowableSerializer.java:69)
        at com.caucho.hessian.io.HessianOutput.writeObject(HessianOutput.java:317)
        at com.caucho.hessian.io.HessianOutput.writeFault(HessianOutput.java:297)
        at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:190)
        at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109)
        at org.springframework.remoting.caucho.Hessian2SkeletonInvoker.invoke(Hessian2SkeletonInvoker.java:94)
        at org.springframework.remoting.caucho.HessianExporter.invoke(HessianExporter.java:142)
        at org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:70)
        at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

由于

1 个答案:

答案 0 :(得分:1)

这只是意味着您正在写入已被另一端关闭的连接。浏览器始终执行此操作:用户在完全加载之前导航离开页面。别担心。