Setup Database Failed
Asked by Jeff Rey Asuncion:

We have been trying to configure our confluence 5.5 installation but we're struggling on this issue when setting up a database.

**The following error(s) occurred:**

* Configuring the database failed. Couldn't create the database schema.
* Error creating bean with name 'cacheStatisticsManager' defined in class path resource \[services/cacheServiceContext.xml\]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheStatisticsManager' defined in URL \[jar:file:/opt/confluence-5.5/confluence/WEB-INF/lib/confluence-cache-ehcache-5.5.3.jar!/cacheProviderContext.xml\]: Cannot resolve reference to bean 'userI18NBeanFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userI18NBeanFactory' defined in class path resource \[i18NContext.xml\]: Cannot resolve reference to bean 'localeManager' while setting bean property 'localeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localeManager' defined in class path resource \[i18NContext.xml\]: Cannot resolve reference to bean 'settingsManager' while setting bean property 'settingsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource \[applicationContext.xml\]: Cannot resolve reference to bean 'upgradeManager' while setting bean property 'upgradeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upgradeManager' defined in class path resource \[upgradeSubsystemContext.xml\]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'upgradeTasks' threw exception; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is net.sf.hibernate.exception.GenericJDBCException: Cannot open connection

The database that we are trying to put in-place is MySQL. The database is on a cluster (using MySQL Galera and HAProxy).

In the JDBC setting, when being asked for the JDBC URL, we are feeding this information:

**jdbc:mysql://*host_name_of_the_load_balancer(HAPROXY)*/confluence?sessionVariables=storage_engine%3DInnoDB**

I hope someone can help us on this issue and enlighten us with our inquiries.

1. Is it valid to use a Database Cluster (MySQL Galera and HAProxy) for confluence.

2. If yes, what sort of items may we have missed-out in our set-up to work.

FYI: We have installed a mysql-client in our confluence server as well to test if it can connect to the Database via the LoadBalancer (HAProxy) and seems to be working fine.

Hoping for your kind consideration and most positive response.

Thanks in advance,

Jeff


Answers:
author: Jeff Rey Asuncion
body: Hi Sean.

As of this writing., nope, i havent had any encountered issue on the setup of our atlassian products installed in our premise (i.e. wiki, jira, crowd) which are all configured to use galera and haproxy. the rsync which is being used by galera underneath is smooth combined with the configuration made in galera and haproxy.

Jeff Rey


author: Sean Eubanks
body: Hi Jeff,

I'm considering using Galera with HAProxy, as well. Have you had any issues with your setup since your last post? My main concern is that Confluence or JIRA will fall out of sync with Galera.

I'd greatly appreciate your input.

Sean


author: Jeff Rey Asuncion
body: Finally figured this one out.

During the confluence setup, we have temporarily pointed the target database (via JDBC) on just one node.

After completing the confluence setup wizard., we stopped the confluence and edited the confluence.cfg.xml to finally point it to the assigned host (or IP Address) that of the MySQL Galera Cluster.

Start the confluence again and should now be working good.

FYI: We have also installed JIRA that has also used the same database and didnt encounter any issues similar to what we have experienced in confluence.

Hope this will somehow help others who might have this road block as well.


Tags: database

error