2010-04-14
java.net.SocketException:Software caused connection abort: socket write error
文章分类:数据库
使用mysql 6.0和hibernate 3.2开发的一个小型网站,上传到服务器上,第一天还能够正常访问,第二天一早就出现了异常,异常如下:
2010-04-14 11:27:13:WARNhttp-8080-4org.hibernate.util.JDBCExceptionReporter-SQL Error: 0, SQLState: 08S01
2010-04-14 11:27:13:ERRORhttp-8080-4org.hibernate.util.JDBCExceptionReporter-Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2739)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2650)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1581)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3004)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1128)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1222)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at com.cngoto.cjdy.car2.dao.Cjdy2cardetailDao.getListHot(Cjdy2cardetailDao.java:42)
at org.apache.jsp.cjdy2tab_jsp._jspService(cjdy2tab_jsp.java:170)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
** END NESTED EXCEPTION **
Last packet sent to the server was 0 ms ago.
原因分析:Mysql服务器默认的“wait_timeout”是8小时,也就是说一个connection空闲超过8个小时,Mysql将自动断开该 connection。这样就出现了上面这个问题。java.net.SocketException: Software caused connection abort: socket write error。网上的解决方法有几种,我选用第一种:在mysql安装目录下找到my.ini文件中添加超时限制:在该文件最后添加一行:wait_timeout=2880000。这样把之前的超时限制把8小时(28800)扩大为800小时。这样重启了mysql后再在其中输入命令:show global variables like "wait_timeout";查看超时是否已修改为:2880000。重启tomcat(如果已启动),OK。
分享到:
相关推荐
标题:“Software caused connection abort: recv failed” 描述:“Software caused connection abort: recv failed” 知识点解析: ### 背景介绍 “Software caused connection abort: recv failed”这一错误...
解决TestNG单元测试报错Software caused connection abort: socket write error
### 错误解析:Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left 在Android开发过程中,可能会遇到“Caused by: android.system.ErrnoException: write failed: ENOSPC (No space ...
我真的佛了,我把电脑都重装系统了,没想到还是有问题,最终我找到了解决方案。 (我指的重装系统就是win10自带的功能,可能...Network error: Software caused connection abort 原创文章 6获赞 8访问量 726 关注
4. **java.net.SocketException: (Connection reset 或 Connect reset by peer: Socket write error)** 这两种异常都表示连接已断开。可能的原因是一端关闭了Socket,而另一端仍在尝试读写。处理这类异常需要检测到...
连接服务器失败(错误原因:Connection refused) error 111 抓包结果
"java.net.SocketException Connection reset 解决方法" 在 Java 编程中,SocketException 是一种常见的异常,特别是在网络编程中。Conexion reset by peer 是一种特殊的 SocketException,它发生在客户端和服务器...
Oracle数据库是企业级应用广泛使用的数据存储系统,其稳定性和高可用性至关重要。本文将深入探讨Oracle数据库的常见故障类别及规划,旨在帮助管理员更好地预防和处理潜在的问题,确保数据库系统的顺畅运行。...
- **Socket error #10053 - Software caused connection abort**:软件导致连接中断。 - **Socket error #10055 - No buffer space available**:没有可用的缓冲空间。 - **Socket error #10056 - Socket is already...
Caused by: java.net.UnknownHostException: openapi.alipay.com
NavicatPremium 最新版下载安装文件,解决ssl连接失败问题
#### WSAECONNABORTED (10053): Software caused connection abort. - **含义**:一个已建立的连接被本机上的软件终止,可能是由于数据传输超时或协议错误。 - **解决方案**: - 检查是否有超时设置,并适当调整。...
Socket Error 10053 - Software caused connection abort Socket Error 10053是指软件导致连接中断,这种错误通常是由于软件错误所致。解决方法是检查软件,确保它们正确。 Socket Error 10054 - Connection reset...
"解决 Nginx 访问慢和 accept() failed 错误的方法" 在本文中,我们将讨论 Nginx 访问慢和 accept() failed 错误的解决方案。这个问题通常是由于 Nginx 的连接数超过了系统设定的最大值造成的。...
专题资料
"MongoDB 安装出错解决方法" MongoDB 是一款非常流行的 NoSQL 数据库管理系统,但是在安装过程中经常会遇到各种错误,特别是在自定义安装路径时。下面我们将详细介绍 MongoDB 安装出错解决方法。...
"java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver" 解决方案 [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. 解决了jsp连接 sql server 2000的问题
windows下eclipse跑junit报错:CreateProcess error=206后面跟着乱码。 把这个jar替换掉就好了,放在:eclipse/plugins/下面。 参考:https://bugs.eclipse.org/bugs/show_bug.cgi?id=327193
在Java应用程序运行过程中,"java.lang.OutOfMemoryError: PermGen space"错误是常见的一个问题,尤其是在使用Tomcat这样的Java应用服务器时。这个错误表明应用程序在 PermGen 区域(Permanent Generation)耗尽了...
好久不写Android代码手都生了,找出自己之前写的程序发现跑不了了,也没啥特别的错误提示,就看到一句有用的错误Caused by: android.os.NetworkOnMainThreadException,查了下原因上在4.0之后在主线程里面执行Http...