Connection reset by peer: socket write error

Caused by: org.springframework.dao.DataAccessResourceFailureException:

Error querying database. Cause: java.sql.SQLException: Io 异常: Connection reset by peer: socket write error

The error may exist in cn/zgjkw/mtc/dao/IpDatCountMapper.xml

The error may involve cn.zgjkw.mtc.dao.IpDatCountMapper.selectByExample

The error occurred while executing a query

SQL: select ip, dat, num from ip_dat_count WHERE ( dat = ? and ip = ? )

Cause: java.sql.SQLException: Io 异常: Connection reset by peer: socket write error

; SQL []; Io 异常: Connection reset by peer: socket write error; nested exception is java.sql.SQLException: Io 异常: Connection reset by peer: socket write error
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:253)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
at $Proxy9.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:189)
at org.apache.ibatis.binding.MapperMethod.executeForList(MapperMethod.java:85)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:65)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:38)
at $Proxy89.selectByExample(Unknown Source)
at cn.zgjkw.mtc.service.JkwUserService.welcome(JkwUserService.java:191)
at cn.zgjkw.mtc.service.JkwUserService$$FastClassByCGLIB$$de1aeb67.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:617)
at cn.zgjkw.mtc.service.JkwUserService$$EnhancerByCGLIB$$ea217490.welcome()
... 19 more
Caused by: 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.(OracleStatement.java:389)
at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:413)
at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:119)
at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:92)
at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:950)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:802)
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:35)
at $Proxy112.prepareStatement(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:50)
at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:64)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:39)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:55)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:40)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:216)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:95)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:75)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
... 30 more

2个回答

这个问题一般是客户端在连接还没有完全建立的时候就取消连接,比如用户按了浏览器上面的“停止”按钮,一般来说没有什么问题。但是如果频繁出现,就表示很多客户端连接到Apache服务器的响应时间太长了,可能是网络的问题或者服务器性能问题

也可能是你的网络连接存在一些问题,你的数据传输的时候,可能由于时间等待的太久,但是server段设置的连接检验时间限制一定,那么就可能出现这种情况的!

对应的SQL语句是这句:SQL: select ip, dat, num from ip_dat_count WHERE ( dat = ? and ip = ? ) 你检查一下

java.lang.RuntimeException: javax.xml.transform.TransformerException: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error at org.ajaxanywhere.XMLHandler.sendDO......
答案就在这里:Connection reset by peer: socket write error
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐