gpt4 book ai didi

java - 为什么会出现这个错误?已建立的连接被主机中的软件中止

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:08:08 25 4
gpt4 key购买 nike

堆栈:AngularJS v1.6.5、java 8、spring boot、tomcat。经过大约 1 周的工作,应用程序没有响应此类错误。为什么会这样?

前端:

$http({
url: 'find',
method: "post",
data: { 'month' : $scope.month,'year' : $scope.year, 'payTime' : $scope.payTime,'waitTime' : $scope.waitTime,'scanTime' : $scope.scanTime,'gbNumber' : $scope.hyper}
})
.then(function(response) {
..
});
}

后端:

@RequestMapping(path = "/find", method = RequestMethod.POST)
public ReportResponse find(@RequestBody RequestSearch params,
HttpServletResponse response) throws DataNotFoundException {
...

}

堆栈跟踪:

2018-04-02 09:37:44.738 ERROR 14912 --- [p-nio-80-exec-9] o.s.boot.web.support.ErrorPageFilter     : Cannot forward to error page for request [/excel/ExceReport.xls] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

org.apache.catalina.connector.ClientAbortException: java.io.IOException: An established connection was aborted by the software in your host machine
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:356) ~[catalina.jar:8.5.24]
at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:815) ~[catalina.jar:8.5.24]
at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:720) ~[catalina.jar:8.5.24]
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:391) ~[catalina.jar:8.5.24]
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:369) ~[catalina.jar:8.5.24]
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96) ~[catalina.jar:8.5.24]
at org.springframework.util.StreamUtils.copy(StreamUtils.java:138) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.http.converter.ResourceHttpMessageConverter.writeContent(ResourceHttpMessageConverter.java:110) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:102) ~[spring-web-4.3.9.RELEASE.jar:4.3.9.RELEASE]
...

最佳答案

原因

This exception can mean that the connection to the client browser was aborted before the response is fully transferred. It is a harmless warning as it can be due to transient network problems or the user aborts/refreshes the page before it loaded.

其他原因的列表是:

The user closed the browser before the page loaded.

Their Internet connection failed during loading.

They went to another page before the page loaded.

The browser timed the connection out before the page loaded (would have to be a large page).

分辨率

This can be ignored, unless there are other issues that are currently occurring. For example, if the your application server is throwing a lot of these, it might be a sign of a performance problem.

关于java - 为什么会出现这个错误?已建立的连接被主机中的软件中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50951435/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com