Could Not Connect to Database Server

Symptoms

One or more SQL Macro returns the following error:

Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)

Cause

The connection to your database is being refused. 

Resolution

Make sure your database server is accepting connections from the Confluence server TCP address and user is authorized to connect.