I had similar problems, and was forced to revert back to Tomcat 5.0.x. Are you using HTTP or Form-based authentication to get the user credentials?
On Tue, 2005-03-08 at 11:57 -0700, Richard Mixon (qwest) wrote: > Has anything changed with the way that JDBCReal handles connection > timeouts in Tomcat 5.5.7? > > We upgraded from Tomcat 5.0.19 to Tomcat 5.5.7 in production and are now > getting JDBC connection errors when the site has not been accessed for a > while. This is happening when a user tries to login - we use a > JDBCRealm to authenticate the user. > > We had this problem a while back but fixed it by adding the > "autoReconnect" parm, but now with Tomcat 5.5. we are having the problem > again. We are using MySQL 4.1.7 and version 3.1.7 of the MySQL JDBC > connector. > > Here is the realm specification: > > <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" > driverName="com.mysql.jdbc.Driver" > connectionURL="jdbc:mysql://dbserver1:3306/webapp1?autoReconnect=tru > e&autoCommit=true" > connectionName="user1" connectionPassword="password1" > userTable="PoPerson" userNameCol="userid" userCredCol="password" > userRoleTable="PoPersonRole" roleNameCol="roleName" /> > > <Resource name="jdbc/webapp1" > type="javax.sql.DataSource" > auth="Container" > maxActive="100" > maxIdle="10" > maxWait="10000" > defaultAutoCommit="true" > username="user1" > password="password1" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://dbserver1:3306/ltojsw?autoRecon > nect=true&autoCommit=true" > removeAbandoned="true" > removeAbandonedTimeout="60" > logAbandoned="true" > /> > > I also included the corresponding datasource defined for actual > application access. > The actual exception is below. > > Would using the DataSourceReal provide any help here? I was thinking > that since it uses DBCP pooling maybe timeout recovery might be more > robust. I am trying to duplicate the problem in development now, before > trying the DataSourceRealm. > > Thank you all for any suggestions or solutions. > > - Richard > > Here is the exception: > 16:50:00,269 ERROR [TP-Processor6] [/stars]:541 - Exception retrieving > password for "wazinger" > com.mysql.jdbc.CommunicationsException: Communications link failure due > to underlying exception: > > ** BEGIN NESTED EXCEPTION ** > > java.net.SocketException > MESSAGE: Broken pipe > > STACKTRACE: > > java.net.SocketException: Broken pipe > at java.net.SocketOutputStream.socketWrite0(Native Method) > at > java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) > at > java.net.SocketOutputStream.write(SocketOutputStream.java:136) > at > java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) > at > java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) > at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2616) > at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2547) > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1512) > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622) > at com.mysql.jdbc.Connection.execSQL(Connection.java:2376) > at com.mysql.jdbc.Connection.execSQL(Connection.java:2297) > at > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java: > 1860) > at > com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:170 > 5) > at > org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:526) > at > org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) > at > org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) > at > org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut > henticator.java:256) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator > Base.java:391) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java > :126) > at > org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve > .java:130) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java > :105) > at > org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc > essLogValve.java:481) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. > java:107) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 > 48) > at > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) > at > org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) > at > org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: > 675) > at > org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool > .java:684) > at java.lang.Thread.run(Thread.java:595) > > > ** END NESTED EXCEPTION ** > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
