“java.net.SocketException:连接重置”有时在 Tomcat 本地主机日志上

发布于 2024-11-02 08:24:08 字数 4487 浏览 0 评论 0原文

这似乎是一个著名的问题。但我无法从谷歌找到简短的答案。 我有许多客户端通过 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)

谢谢

This seems a famous issue. But I could not find a brief answer from Google.
I have many clients connect to a Tomcat server through a Apache proxy server. Sometimes, I see this error on localhost log of tomcat. I want to know what are possible reasons. At which point, the connection was "reset"? I have a limited access to the enviroment, so I couldn't use tools to check the connections.

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)

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2024-11-09 08:24:08

这仅意味着您正在写入已被另一端关闭的连接。浏览器一直在这样做:用户在页面完全加载之前就离开了页面。别担心。

It just means that you are writing to a connection that has already been closed by the other end. Browsers do this all the time: the user navigated away from the page before it loaded completely. Don't worry about it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文