tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Jacobson" <b8rrqi...@sneakemail.com>
Subject first authentication attempt fails - mysql timeout
Date Mon, 21 Apr 2008 16:33:57 GMT

Hi,

I have an existing Tomcat configuration that is working well.  However, 
it is running version 4.1.31.  We are updating the platform, so I 
thought I'd take the opportunity to update Tomcat.  Unfortunately (??) I 
must stick with the Tomcat 4.1 release.

I have a test machine on which I have installed 4.1.37.  I only had one 
issue with the upgrade -- the authentication was not working quite as 
well as it was before.  While it worked, I had one issue -- when the 
mysql connection would timeout (after 8 hours by default), the 
authentication would stop working completely.  With tomcat 4.1.31, there 
would be an exception w/ stack trace, but it would reconnect and work 
right away.

I was authenticating using a mysql database through the JDBCRealm.  I 
found some posts in the archives ( 
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg149130.html) 
indicating that switching from the JDBCRealm to DataSourceRealm would 
resolve the issue, so I have done so.  In the process I also added the 
autoReconnect parameter to the  connection URL (i.e. 
jdbc:mysql://localhost:3325/authority?autoReconnect=true )

I suppose I should note that my configuration is now essentially 
straight out of the JNDI datasource HOWTO.  I of course changed the 
username & password, the port number, and the database name.

I have authentication working with the new configuration.  However, 
after a mysql connection timeout, the first attempt to authenticate 
always fails.  The second attempt is successful.

Is there a way to fix this problem?

Thanks for your time.

-- 
Rob

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message