The Atlassian Database Check Utility

A common administration issue when configuring Confluence is identifying database connectivity problems. The helper JSP can isolate database connectivity issues. It simply checks whether you can connect to a database with your application server. If your application server cannot connect to the database, Confluence certainly will not.

Purpose:

  • Check that your application server can successfully query your database (either via immediate JDBC connectivity or a Datasource in the context of your application server).
  • Pinpoint problems in your configuration which may occur if the above is failing.

Functionality:

  • Check that a JDBC Driver can be loaded into memory and view what is already loaded.
  • Connect to a JDBC URL and do a 'select 1' from the database.
  • Find a DataSource in the JNDI environment and do the above.
  • View the System classpath (to ensure that the JDBC jar file is there).

Using the Utility

If you have already setup Confluence completely

  1. Download testdatabase.jsp to 'MY-CONF-INSTALL-PATH\confluence'

  2. Restart Confluence

  3. Go to http://MY-CONF-SERVER:MY-CONF-PORT/testdatabase.jsp

  4. Check that your database driver is loaded into memory. If not, check the system classpath for the JDBC driver file, and that the driver is in the confluence-install/common/lib folder as per the instructions

  5. Enter the DB settings Confleunce is using and test the database. If an error appears, check that the db service is running, the location matches, and that any users specified actually exist with the right login and permissions. You may be able to find a workaround by googling the error.

If you cannot setup Confluence because of an error in 'Configuring Database'

  1. Record the DB settings you are using for your direct JDBC or datasource connection in the 'Configure Database' step of your setup

  2. Download testdatabase.jsp to 'MY-CONF-INSTALL-PATH\confluence'

  3. Rename 'MY-CONF-INSTALL-PATH\confluence\WEB-INF\web.xml' to 'backup web.xml' (This disables redirection)

  4. Restart Confluence

  5. Go to http://MY-CONF-SERVER:MY-CONF-PORT/testdatabase.jsp

  6. Check that your database driver is loaded into memory. If not, check the system classpath for the JDBC driver file, and that the driver is in the confluence-install/common/lib folder as per the instructions

  7. Enter the DB settings you recorded and test the database. If an error appears, check that the db service is running, the location matches, and that any users specified actually exist with the right login and permissions. You may be able to find a workaround by googling the error.

  8. After correcting the error, rename 'MY-CONF-INSTALL-PATH\confluence\WEB-INF\backup web.xml' back to 'web.xml'

Notes

This JSP is bundled in Confluence 1.2.4 and onwards. It can be used with earlier versions quite easily.
If you use this utility, please let us know ways in which we could improve it or leave helpful hints for others here.
(info) For a comprehensive set of database manual that might be helpful for troubleshooting, please refer to the following links:

Request Technical Support

If you're still stuck after attempting the suggestions above, lodge a free technical support request with information on your database setup.