Confluence failure
Asked by John Hillerich:

Hello,

I recently ran into an issue with confluence not starting up. I went ahead and tried starting in the foreground as confluence user. I changed the home directory and all sub directories to 777, I went ahead and even upgraded using the same version and still had issues.

I also went ahead and tried using the backup file from the upgrade on a new installation and that did not work.

I also tried uploading the backup to the cloud and still had issues.

I am going to try and upgrade this to the newest version so see if that helps, but I will first backup the VM in case I need to go to a fresh start.

Does anyone know how I can fix this or if there is a way for me to actually just export a working version so I can load it on a new server?

Here are the logs from the FG start.

$ ./opt/atlassian/confluence/bin/start-confluence.sh -fg  
executing as current user  
If you encounter issues starting up Confluence, please see the Installation guide at <http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide>

Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out  
---------------------------------------------------------------------------  
Using Java: /opt/atlassian/confluence/jre//bin/java  
2020-07-08 11:34:23,740 INFO \[main\] \[atlassian.confluence.bootstrap.SynchronyProxyWatchdog\] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/atlassian/confluence/conf/server.xml. No further action is required  
---------------------------------------------------------------------------  
Using CATALINA_BASE: /opt/atlassian/confluence  
Using CATALINA_HOME: /opt/atlassian/confluence  
Using CATALINA_TMPDIR: /opt/atlassian/confluence/temp  
Using JRE_HOME: /opt/atlassian/confluence/jre/  
Using CLASSPATH: /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar  
Using CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid  
08-Jul-2020 11:34:24.281 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server\] failed to set property \[debug\] to \[0\]  
08-Jul-2020 11:34:24.355 WARNING \[main\] org.apache.catalina.startup.SetAllPropertiesRule.begin \[SetAllPropertiesRule\]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.  
08-Jul-2020 11:34:24.377 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine\] failed to set property \[debug\] to \[0\]  
08-Jul-2020 11:34:24.383 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host\] failed to set property \[debug\] to \[0\]  
08-Jul-2020 11:34:24.427 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host/Context\] failed to set property \[debug\] to \[0\]  
08-Jul-2020 11:34:24.452 WARNING \[main\] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match \[Server/Service/Engine/Host/Context\] failed to set property \[debug\] to \[0\]  
08-Jul-2020 11:34:24.792 INFO \[main\] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler \["http-nio-8090"\]  
08-Jul-2020 11:34:24.829 INFO \[main\] org.apache.catalina.startup.Catalina.load Server initialization in \[659\] milliseconds  
08-Jul-2020 11:34:24.837 INFO \[main\] org.apache.catalina.core.StandardService.startInternal Starting service \[Tomcat-Standalone\]  
08-Jul-2020 11:34:24.845 INFO \[main\] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: \[Apache Tomcat/9.0.22\]  
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".  
SLF4J: Defaulting to no-operation (NOP) logger implementation  
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.  
08-Jul-2020 11:34:26.465 INFO \[Catalina-utility-2\] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath  
08-Jul-2020 11:34:26.565 INFO \[Catalina-utility-2\] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.  
08-Jul-2020 11:34:26.743 INFO \[Catalina-utility-2\] org.apache.catalina.core.ApplicationContext.log Initializing Spring DispatcherServlet 'dispatcher'  
2020-07-08 11:34:27,319 INFO \[Catalina-utility-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 7.1.0 \[build 8301 based on commit hash 8fa50d05398fea29bc3b44b63cde07d279fbe836\] - synchrony version 3.1.0-master-0f086db5  
2020-07-08 11:34:34,543 ERROR \[Catalina-utility-1\] \[atlassian.confluence.setup.ConfluenceConfigurationListener\] contextInitialized An error was encountered while bootstrapping Confluence (see below):  
Cannot connect to h2db  
java.lang.RuntimeException: Cannot connect to h2db  
at com.atlassian.h2.DatabaseCreatingServerLifecycle.start(DatabaseCreatingServerLifecycle.java:57)  
at com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateConfig.getHibernateProperties(ConfluenceHibernateConfig.java:51)  
at com.atlassian.confluence.setup.DefaultBootstrapManager.getHibernateProperties(DefaultBootstrapManager.java:634)  
at com.atlassian.confluence.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:318)  
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:81)  
at com.atlassian.confluence.setup.DefaultBootstrapManager.init(DefaultBootstrapManager.java:188)  
at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:36)  
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:133)  
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:64)  
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682)  
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143)  
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)  
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.lang.Thread.run(Thread.java:748)  
Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" \[50000-196\]  
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)  
at org.h2.message.DbException.get(DbException.java:168)  
at org.h2.message.DbException.convert(DbException.java:295)  
at org.h2.engine.Database.openDatabase(Database.java:307)  
at org.h2.engine.Database.\<init\>(Database.java:270)  
at org.h2.engine.Engine.openSession(Engine.java:64)  
at org.h2.engine.Engine.openSession(Engine.java:176)  
at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154)  
at org.h2.engine.Engine.createSession(Engine.java:137)  
at org.h2.engine.Engine.createSession(Engine.java:27)  
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354)  
at org.h2.jdbc.JdbcConnection.\<init\>(JdbcConnection.java:116)  
at org.h2.jdbc.JdbcConnection.\<init\>(JdbcConnection.java:100)  
at org.h2.Driver.connect(Driver.java:69)  
at java.sql.DriverManager.getConnection(DriverManager.java:664)  
at java.sql.DriverManager.getConnection(DriverManager.java:247)  
at com.atlassian.h2.DatabaseCreatingServerLifecycle.start(DatabaseCreatingServerLifecycle.java:52)  
... 20 more  
Caused by: java.lang.NullPointerException  
at org.h2.mvstore.db.ValueDataType.compare(ValueDataType.java:104)  
at org.h2.mvstore.MVMap.compare(MVMap.java:713)  
at org.h2.mvstore.Page.binarySearch(Page.java:334)  
at org.h2.mvstore.MVMap.binarySearch(MVMap.java:466)  
at org.h2.mvstore.MVMap.get(MVMap.java:455)  
at org.h2.mvstore.MVMap.remove(MVMap.java:543)  
at org.h2.mvstore.db.TransactionStore.rollbackTo(TransactionStore.java:506)  
at org.h2.mvstore.db.TransactionStore$Transaction.rollback(TransactionStore.java:803)  
at org.h2.mvstore.db.MVTableEngine$Store.initTransactions(MVTableEngine.java:256)  
at org.h2.engine.Database.open(Database.java:767)  
at org.h2.engine.Database.openDatabase(Database.java:276)  
... 33 more  
2020-07-08 11:34:34,576 WARN \[Catalina-utility-1\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Not starting full plugin system due to upgrade  
2020-07-08 11:34:35,268 INFO \[Catalina-utility-1\] \[com.atlassian.confluence.lifecycle\] init Confluence is ready to serve  
08-Jul-2020 11:34:35.292 INFO \[main\] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler \["http-nio-8090"\]  
08-Jul-2020 11:34:35.308 INFO \[main\] org.apache.catalina.startup.Catalina.start Server startup in \[10,478\] milliseconds  
2020-07-08 11:34:38,009 ERROR \[http-nio-8090-exec-1\] \[confluence.setup.johnson.WebAppContextPathCheck\] check Bootstrap did not initialize.  
2020-07-08 11:34:38,614 ERROR \[http-nio-8090-exec-2\] \[atlassian.confluence.util.AbstractBootstrapHotSwappingFilter\] doFilter Could not get swap target filter  
-- referer: <http://172.16.0.201:8090/> \| url: /johnson/data \| traceId: 008e9dabf03a8bff  
2020-07-08 11:34:44,277 ERROR \[http-nio-8090-exec-3\] \[atlassian.confluence.util.AbstractBootstrapHotSwappingFilter\] doFilter Could not get swap target filter  
-- referer: <http://172.16.0.201:8090/> \| url: /johnson/fav-confluence.ico \| traceId: 000726b088cb355b  
2020-07-08 11:34:59,238 ERROR \[http-nio-8090-exec-4\] \[atlassian.confluence.util.AbstractBootstrapHotSwappingFilter\] doFilter Could not get swap target filter  
-- referer: <http://172.16.0.201:8090/> \| url: /johnson/data \| traceId: 003c92815060d846


Answers:
author: Dave Theodore [Coyote Creek Consulting]
body: It's configured to use the in-memory database. Is that how you had things set up? If you were connecting to a proper database, it seems that Confluence can't find the "confluence.cfg.xml" configuration file. Check [this doc](https://confluence.atlassian.com/confkb/how-to-relocate-the-confluence-home-directory-318668907.html) to determine where Confluence thinks its home directory is located. Once you know that, make sure there is a confluence.cfg.xml with the correct database details there. You could also search your filesystem for that config file name to see where the home directory is, in case you need to manually piece things back together.