2 keithssy keithssy 于 2014.05.01 21:53 提问

Connection reset by peer: socket write error

这个错误在网上能查到很多结果,但是我参照做都没有效果,现在问题依然存在,详细的错误信息如下

2014-05-01 21:46:37 -close connection error

java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:587) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:4011) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:167) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.stat.StatFilter.connection_close(StatFilter.java:254) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:163) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115) ~[druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82) ~[druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.discardConnection(DruidDataSource.java:967) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:934) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4534) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:661) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4530) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:880) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:872) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97) [druid-1.0.0.jar:1.0.0]
at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:162) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:456) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:464) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at com.payplat.util.jdbc.other.impl.JdbcServerImpl.meterList(JdbcServerImpl.java:88) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at com.smotive.action.DasControl.meterList(DasControl.java:52) [DasControl.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45]
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [servlet-api.jar:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.35]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.35]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.35]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) [catalina.jar:6.0.35]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877) [tomcat-coyote.jar:6.0.35]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594) [tomcat-coyote.jar:6.0.35]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675) [tomcat-coyote.jar:6.0.35]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.7.0_45]
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) ~[na:1.7.0_45]
at java.net.SocketOutputStream.write(SocketOutputStream.java:159) ~[na:1.7.0_45]
at oracle.net.ns.DataPacket.send(DataPacket.java:210) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:321) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:268) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:190) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:107) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:61) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:574) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
... 55 common frames omitted

根据网上的说法,出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:
①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;
②:客户关掉了浏览器,而服务器还在给客户端发送数据;
③:浏览器端按了Stop
2、3点可以排除,第一点让我觉得确实有问题,但是不知道该如何下手,还有一个问题就是,这个异常不是我手动捕获的,在我try catch前这个异常已经抛出,这个让我不解

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
Redis经常连接不上还报 Connection reset by peer: socket write error的错误的解决办法
网上提供思路普遍的几种就是: ①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;   ②:客户关掉了浏览器,而服务器还在给客户端发送数据;   ③:浏览器端按了Stop  对于第二种情况: 多人都说是客户端造成的,没有办法控制,而且后台会记录这个异常,日志也会疯狂爆满,时间长了,肯定会DOWN掉的. 本人觉得大多数可能是第二条问题的原因引起
Connection reset by peer: socket write error错误分析及解决 .
Connection reset by peer: socket write error错误分析: 常出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:  ①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;  ②:客户关掉了浏览器,而服务器还在给客户端发送数据;  ③:浏览器端按了Stop  通常原因为
java.net.SocketException: Connection reset by peer: socket
最近一个项目中用到了Spring MVC 计时器 + HttpClient 发送http请求,封装post请求代码如下:
Connection reset by peer: socket write error错误分析
网上网友有提到过许多种情况,例如 ①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;   ②:客户关掉了浏览器,而服务器还在给客户端发送数据;   ③:浏览器端按了Stop   还有一种情况,它是有可能是服务端或者客户端的防火墙造成的,试着关闭服务端的杀毒软件就成功了,不行的话再关闭系统自带的防火墙
FtpClient连接ftp 报Connection reset by peer: socket write error异常
使用FtpClient连接ftp时候发现报Connection reset by peer: socket write error错误,但是之前一个demo连接确没有问题,最后对比了一下发现jdk版本不一样,报错项目使用了默认jdk,demo里边使用的本地安装的jdk1.6.0_10版本,把报错项目改成本地jdk之后,错误消失,不知道是不是版本太低,有时间可以了解下
java报错:Connection reset by peer: socket write error
用java做excel导出时,报错: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error   大致出现问题的原因如下:1、这个问题一般是客户端在连接还没有完全建立的时候就取消连接,比如用户按了浏览器上面的“停止”按钮,一般来说没有什么问题。但是如果频繁出现,就
Connection reset by peer: socket write error错误分析:
Connection reset by peer: socket write error错误分析: 常出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:   ①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;   ②:客户关掉了浏览器,而服务器还在给客户端发送数据;   ③:浏览器端按了Stop   通常原因为
关于Connection reset by peer: socket write error报错
本地redis配置好哨兵模式后,使用spring整合redis报错Caused by: redis.clients.jedis.exceptions.JedisConnectionException:  java.net.SocketException: Connection reset by peer: socketwrite error解决:在Redis从机中sentinel.conf配置文件...
Connection reset by peer: socket write error错误分析及解决
Connection reset by peer: socket write error 这个跟数据库没有关系,当客户端发出请求(request)后,如果还没有完全获得服务端的响应(response),客户端与服务器段的连接断开(例如断网、按了“停止”按钮、或者客户端浏览器关闭等),服务器端就会抛出此Exception。 Causes and solutions This exce
fastdfs文件上传java--根据网络io流上传-避免Connection reset by peer: socket write error
1:添加依赖 net.oschina.zcx7878 fastdfs-client-java 1.27.0.0 2:配置config.conf  里面可以只配置tracker的地址和端口 tracker_server=192.168.0.180:22122 3:编写代码 3.1编写UploadF