当前位置: 代码迷 >> Java Web开发 >> 后台报错Connection reset by peer: socket write error,该如何处理
  详细解决方案

后台报错Connection reset by peer: socket write error,该如何处理

热度:269   发布时间:2016-04-17 13:06:25.0
后台报错Connection reset by peer: socket write error
[Microsoft][SQLServer   2000   Driver   for   JDBC]Connection   reset   by   peer:   socket   write   error

我的系统是MS   SQL   SERVER   2000做的数据库,采用tomcat的dataSource做的连接池,问题是:
我对数据库进行还原操作,成功后,重新启动数据库服务器!然后跳转到登录页面,而这时就会报   以下错误!
java.sql.SQLException:   [Microsoft][SQLServer   2000   Driver   for   JDBC]Connection   reset   by   peer:   socket   write   error
at   com.microsoft.jdbc.base.BaseExceptions.createException(Unknown   Source)
at   com.microsoft.jdbc.base.BaseExceptions.getException(Unknown   Source)
at   com.microsoft.jdbc.base.BaseExceptions.getException(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown   Source)
at   com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown   Source)
at   com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown   Source)
at   com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown   Source)
at   com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown   Source)
at   org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at   xnc.db.query.DBQuery.getRs(DBQuery.java:60)
at   org.apache.jsp.login_jsp._jspService(login_jsp.java:145)
at   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at   org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at   java.lang.Thread.run(Unknown   Source)
报此错误的同时,数据库服务器是打开状态,即使我重新启动了   数据库服务器,依然会报此错误,我重新打开一个浏览器页,也一样报此错误!
只有当我将TOMCAT重新启动后,才访问正常!

这是为什么呢?难道连接池不能监听到数据库服务器的状态?必须重新对连接池初始化?非要重启tomcat?请高手指点!

------解决方案--------------------
貌似这个问题 ,我不会,帮你顶&&接分
------解决方案--------------------
这个问题我也遇到了 我是因为 服务器 端请求了两次连接 导致的 你看看你的程序是 不是 请求过多次 数据库连接
------解决方案--------------------
不会,不过不像是数据库服务器的问题。
------解决方案--------------------
关注
------解决方案--------------------
  相关解决方案