2012/2/8 Jonathan Rosenberg <j...@tabbysplace.org>:
> Vital statistics:
>
>    Apache Tomcat/7.0.22        1.6.0_22-b04    Sun Microsystems Inc.   Linux
>
> 1) Using org.apache.catalina.realm.UserDatabaseRealm for
> authentication to Manager app.  No pooling.
> 2) Running a Grails app that is using CAS authentication on remote
> server.  Using dbcp pooling.
> 3) App & Tomcat auth use different DBs  App's DB is remote, Tomcat is
> using local DB server.
> 4) App is in testing & lightly used during the day.  Works fine.
> 5) App sits idle over night.
>
> If I access my app first thing in the morning, I get the following
>
> Feb 8, 2012 9:09:58 AM org.apache.catalina.realm.JDBCRealm getPassword

JDBCRealm does not use pooling. (The recommended alternative that uses
pooling is DataSourceRealm).

It does not match your configuration description above, so I am
confused. Maybe you can inspect your configuration more closely and
find where this realm comes from.


> SEVERE: Exception performing authentication
> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
> No operations allowed after connection closed.Connection was
> implicitly closed by the driver.
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> . . . .

The full stacktrace may help to find where this call comes from. (Re:
your question "Why is Tomcat trying to authenticate?").

"newInstance0()", so it tries to create an instance of some class?

>
> To me this looks like a DB timeout issue to be solved by pooling.  But
> here's where I'm confused:
>
> 1) I'm trying to authenticate via CAS.  Tomcat authentication should
> not be an issue.  Why is Tomcat trying to authenticate?
> 2) After this exception, my app gets repeated connection failures
> complaining about closed DB connections.  But I am using dbcp pooling,
> which I;ve done many times without problems.  I feel as is this is
> related to the Tomcat auth failure.
> 3) I have to reload the app to make things start working.
>
> I've spent a few days on this, but just made the (theorized)
> connection between Tomcat auth failure & my app's failures.
>
> I'm gonna start digging into this theory but was hoping for some ideas
> & pointers.
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to