Fail to Start Confluence after Reboot
Asked by shuxin li:

I installed Confluence on a Ubuntu 16.04LTS server. It worked well in the past three months. The server was ever reboot several times before and the Confluence service was started normally after reboot.

Unfortunately, the Confluence server failed to start after the server was reboot last week. It was using MySQL database. I checked the service status. Both confluence and mysql services were started. However, I got a 404 error when I tried to connect Confluence with a browser.

I checked the confluence log file and found may error messages. The log file was too big to attach here. It seemed there're something wrong with the JDBC connection. How can I checked the status on Confluence service? Is there anything wrong with the JDBC connection? How can I fix it?

The last packet successfully received from the server was 2,600 milliseconds ago. The last packet sent successfully to the server was 5 milliseconds ago.  
-- url: /setup/setupdata.action \| traceId: 8be271898e4153e1 \| userName: anonymous \| referer: <http://192.168.0.109:8090/setup/setupdata-start.action> \| action: setupdata  
2017-11-15 11:03:30,469 ERROR \[Caesium-1-1\] \[impl.schedule.caesium.JobRunnerWrapper\] runJob Scheduled job com.atlassian.confluence.plugins.confluence-document-conversion-library:conversionQueueMonitorRunner#conversionQueueMonitor jobToBeExecuted failed to run  
-- url: /setup/setupdata.action \| traceId: 8be271898e4153e1 \| userName: anonymous \| referer: <http://192.168.0.109:8090/setup/setupdata-start.action> \| action: setupdata  
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is net.sf.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection  
at org.springframework.orm.hibernate.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:473)  
at com.atlassian.confluence.impl.hibernate.ConfluenceHibernateTransactionManager.doBegin(ConfluenceHibernateTransactionManager.java:41)  
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)  
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)  
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)  
at com.sun.proxy.$Proxy147.getTransaction(Unknown Source)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)  
at com.atlassian.confluence.schedule.listeners.ScheduledJobsListener.executeInTransaction(ScheduledJobsListener.java:162)  
at com.atlassian.confluence.schedule.listeners.ScheduledJobsListener.executeInTransactionAndHandleExceptions(ScheduledJobsListener.java:139)  
at com.atlassian.confluence.schedule.listeners.ScheduledJobsListener.jobToBeExecuted(ScheduledJobsListener.java:97)  
at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.runJob(JobRunnerWrapper.java:82)  
at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)  
at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)  
at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)  
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443)  
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(CaesiumSchedulerService.java:410)  
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:388)  
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285)  
at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282)  
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)  
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)  
at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)  
at java.lang.Thread.run(Thread.java:748)  
Caused by: net.sf.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection  
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:115)  
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)  
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)  
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)  
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:102)  
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:129)  
at org.hibernate.internal.SessionImpl.connection(SessionImpl.java:514)  
at com.atlassian.hibernate.adapter.adapters.session.SessionV2Adapter.connection(SessionV2Adapter.java:159)  
at org.springframework.orm.hibernate.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:422)  
... 25 more  
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure


Answers:
author: shuxin li
body: I didn't find a file named dbconfig.xml even searching the whole file system. Could you please tell me where the

I suppose it shouldn't be a user/password issue because I have been using confluence for several months. It just stopped working after the server was reboot. I didn't change anything to the database during reboot. Is there anyway to fix Confluence? E.g. may I reinstall Confluence while keep the previous database?

comments: author: Francesc Arb?
body: What kind of database are you using with Confluence?


author: shuxin li
body: I'm using MySQL.


author: shuxin li
body: If it's hard to recover the installation, I would like to reinstall Confluence if the database could be reused. Is that possible?


author: Francesc Arb?
body: If you still have your database, you can create a dump and, once installed Confluence again you can try to bulk it. First, try this in a local install to check if it works ok.


author: Francesc Arb?
body: Hi [@shuxin li](/t5/user/viewprofilepage/user-id/1189784),

it seems Confluence can reach the database: "Communications link failure". I can see also "Unable to acquire JDBC Connection".  

I would check dbconfig.xml file if the information is correct (such as user/password) and also, I would check if this user acces the right access into the database.

comments: author: shuxin li
body: I didn't find a file named dbconfig.xml even searching the whole file system. Could you please tell me where the

I suppose it shouldn't be a user/password issue because I have been using confluence for several months. It just stopped working after the server was reboot. I didn't change anything to the database during reboot. Is there anyway to fix Confluence? E.g. may I reinstall Confluence while keep the previous database?