Description
We had a database problem where the database was offline for more than a week. However ranger connot connect to the DB.
Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database! [C3P0PooledConnectionPoolManager[identityToken->1hgf80qaljdycrokead8h|73c6299]-HelperThread-#0] WARN com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger$WarnLogger (Slf4jMLog.java:223) - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@7179549 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure [C3P0PooledConnectionPoolManager[identityToken->1hgf80qaljdycrokead8h|73c6299]-HelperThread-#0] WARN com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger$WarnLogger (Slf4jMLog.java:220) - Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@5efb2b9 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
Internal Exception: java.sql.SQLException: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.ResourcePoolException: A ResourcePool cannot acquire a new resource -- the factory or source appears to be down.
I found out that this is a bug in c3p0 0.9.5.3. This bug was resolved in 0.9.5.4. So I suggest to upgrade the version of c3p0 to 0.9.5.4.
Force kill acquires by rscadrde · Pull Request #91 · swaldman/c3p0 · GitHub