Io 异常: Connection reset by peer: socket write error
java.sql.SQLException: Io 异常: Connection reset by peer: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:389)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:119)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:92)
at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:950)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:802)
at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:50)
at $Proxy0.prepareStatement(Unknown Source)
at com.bz.cy.basedao.JDBCDAO.findBySql(JDBCDAO.java:39)
at com.bz.cy.basedao.JDBCHelper.findBySql(JDBCHelper.java:80)
at com.bz.cy.sys.dao.Sysi020DAO.findTB_SYSAK(Sysi020DAO.java:33)
at com.bz.cy.sys.job.Sysi020.display(Sysi020.java:87)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.bz.cy.servlets.BzServlet.invoke(BzServlet.java:240)
at com.bz.cy.servlets.BzServlet.doPost(BzServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
解决方案:Connection reset by peer: socket write error
关键字: socket write error
出现Connection reset by peer: socket write error 异常的几种可能:
1. 客户端发出请求时,没有完全获得服务器端的响应,客户端与服务器端发生断链(例如网络中断、用户点击了停止按钮、浏览器关闭等)时
2. 服务器的并发连接数超过了最大链接数,服务器关掉了其中的一些链接。
3. 数据传输时的等待时间过长,超出了数据库的会话时间限制。
以上服务器端都有可能报出 socket write error 异常。