Software caused connection abort: recv failed错误

java.net.SocketException: Software caused connection abort: recv failed
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at org.apache.http.impl.conn.LoggingInputStream.read(LoggingInputStream.java:87)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at com.yeapoo.carcare.util.HttpClientUtils.doPost(HttpClientUtils.java:140)
    at com.yeapoo.carcare.util.HttpClientUtils.doPost(HttpClientUtils.java:55)
    at com.yeapoo.carcare.service.QuNaBaoService.searchCarStyle(QuNaBaoService.java:42)
    at com.yeapoo.carcare.controller.QuNaBaoController.searchCarStyle(QuNaBaoController.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)

最近项目使用httpclient连接接口,会有一定频率报这个错误,同一个方法有时候通过有时候报这个错误,

原因是因为CloseableHttpClient这个类被定义成static属性,使用这个工具类连接接口,不能关闭httpclient 只能使用httpGet.releaseConnection();方法,导致连接未关闭,

最后吧CloseableHttpClient这个方法写在了类里面创建

时间: 2024-10-16 18:06:15

Software caused connection abort: recv failed错误的相关文章

错误:Caused by: java.net.SocketException: Software caused connection abort: recv failed

使用Spring JDBC时遇到的Software caused connection abort: recv failed问题 org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback; SQL [select t.f_role_id from db_sys_user_role t where t.f_user_id=?]; Communications link failure

Software caused connection abort: recv failed

Software caused connection abort: recv failed 数据库连接时有时会报此错误.客户端建立短连接后,服务端关闭了连接,但是客户端没有关闭,仍然尝试发送请求,就会发生错误. 描述如下: 客户端和服务端建立tcp的短连接,每次客户端发送一次请求, 服务端响应后关闭与客户端的连接. 如果客户端在服务端关闭连接后,没有释放连接,继续试图发送请求和接收响应. 这个时候就会出错. 这个时候客户端Socket的getOutputStream返回来的OutPutStrea

FTP上传文件,报错java.net.SocketException: Software caused connection abort: recv failed

FTP上传功能,使用之前写的代码,一直上传都没有问题,今天突然报这个错误: java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:152) at java.net.SocketIn

开发:异常收集之 Software caused connection abort: recv failed

近期用ibatis比较多,中间也遇到很多奇葩小问题,但是也纠结我特别久.遂记录下来: 其中一个:java.sql.SQLException: Io 异常: Software caused connection abort: recv failed 这个问题弄了很久,因为大部分数据查询都没有问题,当查到某个特定数据的时候就出现了这个,大概意思就是查询时,连接已关闭 然后就去数据库看数据,发现数据表和实体有区别,数据表多了一个列Line,这个列大部分数据是空的.所以大部分查询没问题, 当查到某个Li

java.net.SocketException:Software caused connection abort: recv failed 异常分析 +socket客户端&服务端代码

java.net.SocketException:Software caused connection abort: recv failed 异常分析 分类: 很多的技术 2012-01-04 12:54 8004人阅读 评论(6) 收藏 举报 socket服务器bufferstring网络java 第 1个异常是java.net.BindException:Address already in use: JVM_Bind.该异常发生在服务器端进行new ServerSocket(port)(p

org.apache.commons.net.ftp.FTPClient 下载文件提示Software caused connection abort: recv failed

今天在使用FTPClient下载文件时,登录成功了,但是提示下图所示的错误信息: 出现这个问题,本以为设置的读取文件目录不对,尝试修改多次无果.为了排除路径的问题,在firefox中安装了插件"FireFTP",连接上之后,可以正常下载,于是该问题排除. 后来在http://blog.csdn.net/wangjinwei6912/article/details/6603152 看到这位朋友的提示防火墙的问题,于是打开系统的防火墙,发现系统的防火墙都是开着的,如下图所示: 尝试把防火墙

关于javaSocket中 Software caused connection abort: recv failed问题

在学习Socket中今天突然遇到了以下这种问题 原来是网路连接出了问题,由于我測试的是远程连接所以是在学校的局域网下,结果非常不稳定,開始还以为怎么了一会连上了一会又出现故障然后把IP地址改为本机的127.0.0.1之后就没有 出现过了.

ClientAbortException: java.net.SocketException: Software caused connection abort: socket write erro

1.错误描述 ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:407) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteCh

LoadRunner Error code 10053,Software caused connection abort

发现问题的应用场景  C/S结构程序,请求响应采用异步机制.即客户端发送一个请求后不是一直等待这个结果,客户端将请求存放在请求队列并获得一个JOBID,服务器运行后将运行结果存放在响应队列,客户端定时查看响应队列,根据JOBID定时从响应队列中获取结果.因此带来的测试问题是受服务器状态影响,客户端获取结果的次数不固定. 测试脚本示例  lrs_create_socket("socket0", "TCP", "LocalHost=0", "