ClientAbortException:java.net.SocketException:对等方重置连接:套接字写入错误

发布于 2024-07-18 09:17:15 字数 2240 浏览 10 评论 0原文

从数据库列检索文件对象时,我经常收到以下错误。 我该如何解决这个问题?

May 8, 2009 3:18:14 PM org.apache.catalina.core.StandardHostValve status
  WARNING: Exception Processing ErrorPage[errorCode=404, location=/error.jsp]
  ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.Response.flushBuffer(Response.java:537)
  at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:286)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)        
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Unknown Source)

Caused by: java.net.SocketException: Connection reset by peer: socket write error
  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:746)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:304)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:991)
  at org.apache.coyote.Response.action(Response.java:182)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 13 more

I am getting the following error frequently while retrieving file object from database column. How can I resolve this problem?

May 8, 2009 3:18:14 PM org.apache.catalina.core.StandardHostValve status
  WARNING: Exception Processing ErrorPage[errorCode=404, location=/error.jsp]
  ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:327)
  at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)
  at org.apache.catalina.connector.Response.flushBuffer(Response.java:537)
  at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:286)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)        
  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  at java.lang.Thread.run(Unknown Source)

Caused by: java.net.SocketException: Connection reset by peer: socket write error
  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:746)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
  at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:304)
  at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:991)
  at org.apache.coyote.Response.action(Response.java:182)
  at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:322)
  ... 13 more

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

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

发布评论

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

评论(4

自此以后,行同陌路 2024-07-25 09:17:15

您的 HTTP 客户端已断开连接。

这可能有几个原因:

  • 响应请求花了太长时间,客户端放弃了
  • 您用客户端无法理解的内容进行了响应
  • 最终用户实际上取消了请求
  • 发生了网络错误
  • ...可能更多

您可以相当轻松地模仿行为:

URL url = new URL("http://example.com/path/to/the/file");

int numberOfBytesToRead = 200;

byte[] buffer = new byte[numberOfBytesToRead];
int numberOfBytesRead = url.openStream().read(buffer);

Your HTTP client disconnected.

This could have a couple of reasons:

  • Responding to the request took too long, the client gave up
  • You responded with something the client did not understand
  • The end-user actually cancelled the request
  • A network error occurred
  • ... probably more

You can fairly easily emulate the behavior:

URL url = new URL("http://example.com/path/to/the/file");

int numberOfBytesToRead = 200;

byte[] buffer = new byte[numberOfBytesToRead];
int numberOfBytesRead = url.openStream().read(buffer);
沒落の蓅哖 2024-07-25 09:17:15

您的日志指示 ClientAbortException,当您的 HTTP 客户端断开与服务器的连接并且在服务器关闭服务器套接字连接之前发生这种情况时,就会发生这种情况。

Your log indicates ClientAbortException, which occurs when your HTTP client drops the connection with the server and this happened before server could close the server socket Connection.

毁我热情 2024-07-25 09:17:15

我在 Google 缓存 的打开页面上遇到此错误。

我认为,缓存页面(客户端)在页面加载时断开

您可以使用过滤器上的 try-catch 忽略此错误日志。

I have got this error on open page from Google Cache.

I think, cached page(client) disconnecting on page loading.

You can ignore this error log with try-catch on filter.

丶情人眼里出诗心の 2024-07-25 09:17:15

Windows 防火墙可能会导致此异常,请尝试禁用它或为端口甚至程序(java)添加规则

Windows Firewall could cause this exception, try to disable it or add a rule for port or even program (java)

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