tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajiv Singla" <rajiv.sin...@infogain.com>
Subject Tomcat 5.0.27 >> java.net.SocketException: Software caused connection abort: recv failed
Date Tue, 29 Nov 2005 07:53:13 GMT

> Hi,
>  
> I am working on a web application which uses Tomcat-5.0.27 as Application server and
MySql 4.1 as DB server. 
> The application uses Struts 1.1 and Hibernate 3.0 frameworks.
> 
> I am facing a problem with the application. If the servers are kept running idle for
a long time(7-8 hours or overnight) and then someone tries to login, the application does
not allow the user to login and throws exceptions.
> When I restart the MySql server, the problem still remains but if I restart the Tomcat
server, it works fine. 
> 
> Could someone tell me what is the problem with the servers and how it could be rectified?

> 
> Here is the full stack trace of errors I get : 
> 
> STACKTRACE: 
> 
> java.net.SocketException: Software caused connection abort: recv failed 
> at java.net.SocketInputStream.socketRead0(Native Method) 
> at java.net.SocketInputStream.read(SocketInputStream.java:129) 
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) 
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) 
> at java.io.BufferedInputStream.read(BufferedInputStream.java:277) 
> at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316) 
> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463) 
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) 
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) 
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) 
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) 
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496) 
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118) 
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1233) 
> at org.hibernate.loader.Loader.doQuery(Loader.java:370) 
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)

> at org.hibernate.loader.Loader.doList(Loader.java:1557) 
> at org.hibernate.loader.Loader.list(Loader.java:1540) 
> at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:113) 
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1254) 
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299) 
> at dao.UserDAO_H.getUserByUserName(UserDAO_H.java:68) 
> at bo.UserBO.validateUser(UserBO.java:46) 
> at actions.LogonAction.execute(LogonAction.java:70) 
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) 
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 
> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) >

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) 
> 
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

> at java.lang.Thread.run(Thread.java:534) 
> 
> 
> ** END NESTED EXCEPTION ** 
> 
> 
> 
> org.hibernate.exception.GenericJDBCException: could not execute query 
> at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)

> at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80) 
> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
> at org.hibernate.loader.Loader.doList(Loader.java:1560) 
> at org.hibernate.loader.Loader.list(Loader.java:1540) 
> at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:113) 
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1254) 
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299) 
> at dao.UserDAO_H.getUserByUserName(UserDAO_H.java:68) 
> at bo.UserBO.validateUser(UserBO.java:46) 
> at actions.LogonAction.execute(LogonAction.java:70) 
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) 
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 
> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) > 
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

> at java.lang.Thread.run(Thread.java:534) 
> Caused by: java.sql.SQLException: Communication link failure: java.net.SocketException,
underlying cause: Software caused connection abort: recv failed 
> 
> ** BEGIN NESTED EXCEPTION ** 
> 
> java.net.SocketException 
> MESSAGE: Software caused connection abort: recv failed 
> 
> STACKTRACE: 
> 
> java.net.SocketException: Software caused connection abort: recv failed 
> at java.net.SocketInputStream.socketRead0(Native Method) 
> at java.net.SocketInputStream.read(SocketInputStream.java:129) 
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) 
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) 
> at java.io.BufferedInputStream.read(BufferedInputStream.java:277) 
> at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1316) 
> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1463) 
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) 
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) 
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) 
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) 
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496) 
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118) 
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1233) 
> at org.hibernate.loader.Loader.doQuery(Loader.java:370) 
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)

> at org.hibernate.loader.Loader.doList(Loader.java:1557) 
> at org.hibernate.loader.Loader.list(Loader.java:1540) 
> at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:113) 
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1254) 
> at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299) 
> at dao.UserDAO_H.getUserByUserName(UserDAO_H.java:68) 
> at bo.UserBO.validateUser(UserBO.java:46) 
> at actions.LogonAction.execute(LogonAction.java:70) 
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) 
> 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 
> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

> at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) 
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) 
> 
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) 
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) 
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

> at java.lang.Thread.run(Thread.java:534) 
> 
> 
> ** END NESTED EXCEPTION ** 
> 
> 
> at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1638) 
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1854) 
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) 
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) 
> at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) 
> at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496) 
> at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118) 
> at org.hibernate.loader.Loader.getResultSet(Loader.java:1233) 
> at org.hibernate.loader.Loader.doQuery(Loader.java:370) 
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)

> at org.hibernate.loader.Loader.doList(Loader.java:1557) 
> ... 37 more 
> [DEBUG] 46:38 (HibernateUtil.java:closeSession:145) 
> Closing Session of this thread. 
> 
> [DEBUG] 46:38 (SessionImpl.java:close:254) 
> closing session 
> 
> [DEBUG] 46:38 (AbstractBatcher.java:closeConnection:437) 
> closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0,
globally: 0) 
> 
> [DEBUG] 46:38 (DriverManagerConnectionProvider.java:closeConnection:129) 
> returning connection to pool, pool size: 1 
> 
> [DEBUG] 46:38 (LogonAction.java:execute:115) 
> ---->Login Fail 
> 
> 
> 
> Could you please help me solve this problem?
> 
> Regards, 
> Rajiv
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message