Faile to startup confluence after upgrade
Asked by System Administrator:

Could not load bootstrap from environment  

BootstrapException: Unable to bootstrap application: failed to find config at: /var/atlassian/application-data/confluence/confluence.cfg.xml

I can find the config file at above path.

```
executing using dedicated user: confluenceIf you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+GuideServer startup logs are located in /opt/atlassian/confluence/logs/catalina.out---------------------------------------------------------------------------Using Java: /opt/atlassian/confluence/jre//bin/java2018-07-21 18:09:44,546 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/confluenceUsing CATALINA_HOME:   /opt/atlassian/confluenceUsing CATALINA_TMPDIR: /opt/atlassian/confluence/tempUsing JRE_HOME:        /opt/atlassian/confluence/jre/Using CLASSPATH:       /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jarUsing CATALINA_PID:    /opt/atlassian/confluence/work/catalina.pidTomcat started.
```


Answers:
author: Brykin Artem
body: I had the same problem. It was solved by upgrading:

sudo ./atlassian-confluence-6.\*-x64.bin

Choose the appropriate installation or upgrade option.  
Please choose one of the following:  
Express Install (uses default settings) \[1\],  
Custom Install (recommended for advanced users) \[2\],  
**Upgrade an existing Confluence installation \[3\])**

**select option 3**

**PS: Another best way to solve this problem:**

Check permissions!!!

chown -R confluence.confluence \<confluence-home\> \<confluence-install\>  
chmod -R 775 \<confluence-home\> \<confluence-install\>

in my case it was: /opt/atlassian and var/atlassian/application-data/confluence

and then check the file **pg_hba.conf** (on ubuntu18 you can find it here /etc/postgresql/10/main/) you must edit this file like this: <https://confluence.atlassian.com/confkb/confluence-postgresql-jdbc-direct-connection-refused-683543784.html>

after all operations just restart:

sudo shutdown -r now

Good Luck!


author: Tejvir Singh
body: Hello everyone,

For me I was getting the same bootstrap did not initialize error and I tried giving it all the permissions and everything but the error was still happening. So the fix for me was the ojdbc.jar file in \<Installation_directory/lib/\>. Once I transferred the file to that location, I was able to start the upgrade and fix the problem.

To be specific I used the ojdbc8.jar.

Hope this helps.

Thanks  
Tejvir Singh


author: Zhongzhun Xie
body: It's because of the confluence home directory permission, confluence cannot find the file due to the current running use dont have the read/write permission to confluence home directory.

Please check:

<https://confluence.atlassian.com/display/DOC/Confluence+Home+Directory>

comments: author: Rich Kucera
body: thank you!


author: System Administrator
body: I changed the owner ship of Confluence.cfg.xml to conflucne:confluence, previously it was root:root. Now I got 404 error and Catalina.out logs are as below

```
?23-Jul-2018 10:38:51.161 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:51.290 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:51.480 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:51.492 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:51.562 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:51.601 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
23-Jul-2018 10:38:52.176 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
23-Jul-2018 10:38:52.226 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-Jul-2018 10:38:52.251 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1245 ms
23-Jul-2018 10:38:52.275 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat-Standalone]
23-Jul-2018 10:38:52.276 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.8
SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
23-Jul-2018 10:38:57.298 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Spring WebApplicationInitializers detected on classpath: [com.atlassian.synchrony.proxy.SynchronyDispatcherServletInitializer@3da8ca5]
2018-07-23 10:38:58,043 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 6.10.1 [build 7702 based on commit hash c32f84c806260a834c2e109e904a2d8ee4f8e175] - synchrony version 2.1.0-master-ed94c233
2018-07-23 10:39:00,564 WARN [localhost-startStop-2] [apache.catalina.util.SessionIdGeneratorBase] log Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [3,156] milliseconds.
23-Jul-2018 10:39:01.288 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'dispatcher'
23-Jul-2018 10:39:01.296 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization started
23-Jul-2018 10:39:01.314 INFO [localhost-startStop-2] org.springframework.web.context.support.AnnotationConfigWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Jul 23 10:39:01 AEST 2018]; root of context hierarchy
23-Jul-2018 10:39:01.529 INFO [localhost-startStop-2] org.springframework.web.context.support.AnnotationConfigWebApplicationContext.loadBeanDefinitions Registering annotated classes: [class com.atlassian.synchrony.proxy.websocket.WebSocketConfig,class com.atlassian.synchrony.proxy.web.SynchronyWebMvcConfig]
23-Jul-2018 10:39:03.028 INFO [localhost-startStop-2] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.initialize Initializing ExecutorService 'defaultSockJsTaskScheduler'
23-Jul-2018 10:39:03.134 INFO [localhost-startStop-2] org.springframework.web.socket.server.support.WebSocketHandlerMapping.registerHandler Mapped URL path [/v1/bayeux-sync1] onto handler of type [class org.springframework.web.socket.server.support.WebSocketHttpRequestHandler]
23-Jul-2018 10:39:03.659 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/healthcheck]}" onto public com.atlassian.synchrony.proxy.web.HealthCheckResult com.atlassian.synchrony.proxy.web.SynchronyProxyRestController.getSynchronyProxyInfo()
23-Jul-2018 10:39:03.668 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/reload],methods=[PUT]}" onto public org.springframework.http.ResponseEntity com.atlassian.synchrony.proxy.web.SynchronyProxyRestController.reloadConfiguration(com.atlassian.synchrony.proxy.web.SynchronyProxyConfigPayload)
23-Jul-2018 10:39:03.759 INFO [localhost-startStop-2] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler]
23-Jul-2018 10:39:04.691 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Mon Jul 23 10:39:01 AEST 2018]; root of context hierarchy
23-Jul-2018 10:39:05.100 INFO [localhost-startStop-2] org.springframework.context.support.DefaultLifecycleProcessor.start Starting beans in phase 2147483647
23-Jul-2018 10:39:05.159 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization completed in 3863 ms
23-Jul-2018 10:39:28.308 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
23-Jul-2018 10:39:28.310 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
23-Jul-2018 10:39:28.413 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [net.sourceforge.jtds.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.414 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.github.gquintana.metrics.sql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.414 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.415 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.416 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.hsqldb.jdbc.JDBCDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.417 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
23-Jul-2018 10:39:28.419 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
23-Jul-2018 10:39:28.443 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8090"]
23-Jul-2018 10:39:28.467 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 36216 ms
```

comments: author: jacklin10
body: I'm having the same problem. Did you end up figuring this out?


author: System Administrator
body: No solution here. Not sure what went wrong.


author: System Administrator
body: Hi Nic

I have long list of errors in Confluence catalina.out, unfortunately this Atlassian Community browser dose not allow me to paste long list in this comment.

These are few lines of errors from Catalina.out

2018-07-21 17:15:12,581 ERROR \[localhost-startStop-1\] \[atlassian.config.bootstrap.DefaultAtlassianBootstrapManager\] init Home is not configured properly:  
2018-07-21 17:15:12,647 ERROR \[localhost-startStop-1\] \[atlassian.confluence.setup.ConfluenceConfigurationListener\] contextInitialized An error was encountered while bootstrapping Confluence

2018-07-21 17:15:14,670 ERROR \[http-nio-8090-exec-1\] \[confluence.setup.johnson.WebAppContextPathCheck\] check Bootstrap did not initialize.  
2018-07-21 17:15:18,070 ERROR \[http-nio-8090-exec-5\] \[atlassian.confluence.util.AbstractBootstrapHotSwappingFilter\] doFilter Could not get swap target filter


author: Nic Brough -Adaptavist-
body: The log you've given us here is the log of a successfully starting Tomcat, so it tells us nothing.

The error message you have given is about Confluence not starting and it is really exactly what it says. It's looking for the file it names and it cannot read it for some reason. Check that it is there and has the right permissions and ownership.


Tags: confluence-server

server