CSP-13025 - java.sql.SQLException Connections could not be acquired from the underlying database!

Product: Confluence

Environment

Operating System  
Affect Version/s 2.5.3
JVM  
Database SQL Server
Application Server JIRA Standalone (Tomcat)

Error Message

2007-11-06 14:13:01,020 WARN [Thread-1] [sf.hibernate.cfg.SettingsFactory] buildSettings Could not obtain connection metadata
java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:264)
	at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
	at net.sf.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:33)
	at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
	at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172)
	at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
.....
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:972)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:260)
2007-11-06 14:13:34,661 ERROR [Thread-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Connections could not be acquired from the underlying database!

Symptom

Diagnostics/Test

Run the Troubleshooting External Database Connections and check whether your application server can access the database using the database details you have supplied in confluence.cfg.xml.

If for whatever reason you cannot use the steps above, use a database application such as DbVisulalizer to try and connect to your database from your confluence server.

Root Cause

There could be a number of reasons that confluence cannot get a connection to the Database.

1) The database details you have entered are incorrect, e.g. the database name or database username/password for your confluence database (check confluence.cfg.xml).
2) The URL for the database is incorrect e.g. jdbc:mysql://yma/confluence?autoReconnect=true, does the host yma exist and is the database server installed on yma (check confluence.cfg.xml).
3) The database server is not running.
4) The network is down (or there is a firewall in between confluence and the database server which is interfering) and the connection to the database cannot be established.
5) Your database password has expired.

Solution

If the details in your confluence.cfg.xml are incorrect you will need to update them. Or if your database server is down, you will need to restart it and check the logs to see why it had failed or stopped (You may need to get the help of your DBA).

If your network is down, or a new firewall is installed you will need to talk to your System Administrator for advice.
If your password is expired (and you will only discover this if you try and connect to your database via your database client or an external database tool such as DbVisulalizer), you will need to update your password. You may wish to deactivate expiring passwords for your confluence database user to prevent the problem happening again in the future (You should consult with your DBA).

Labels

confluence confluence Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.