Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

K8s - Confluence cannot write to home directory - folder permissions are correct


After moving from Rancher to Kubernetes, I can't get confluence to start.  The error stated in the UI is: 


Your dedicated Confluence user needs read, write and execute permissions to the Confluence home directory /var/atlassian/confluence
See our documentation for more information on setting your home directory.


My test below shows that

  • confluence is running as "daemon",
  • I am logged in as "daemon",
  • the folder /var/atlassian/confluence is 755 and owned by "daemon", and
  • I (as daemon) can write a file to it ("why_cant_you_write_here").
bash-4.4$ ps -ef | grep java
1 daemon 1:06 /usr/lib/jvm/java-1.8-openjdk/bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dconfluence.context.path= -Datlassian.plugins.startup.options=-fg -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2018-03-18_21-00-40.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Dignore.endorsed.dirs= -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence org.apache.catalina.startup.Bootstrap start

bash-4.4$ whoami

bash-4.4$ ls -l /var/atlassian/
total 0
drwxr-xr-x 1 daemon daemon 74 Mar 18 20:51 confluence

bash-4.4$ touch /var/atlassian/confluence/why_cant_you_write_here
bash-4.4$ ls -l /var/atlassian/confluence/
total 4
-rw-r--r-- 1 daemon daemon 3601 Mar 9 14:55 confluence.cfg.xml
drwxr-xr-x 1 daemon daemon 94 Mar 9 14:55 logs
drwxr-xr-x 1 daemon daemon 0 Mar 9 14:48 shared-home
-rw-r--r-- 1 daemon daemon 0 Mar 18 20:51 test
-rw-r--r-- 1 daemon daemon 0 Mar 18 21:10 why_cant_you_write_here

I don't see that this is a permissions issue, however the UI is still stating that it's a permissions issue and that it can't write here. I've tried various file/folder mode (including 777!), with no change in the error. 

During startup I get a possibly-related null pointer exception: 

Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out
Using Java: /usr/lib/jvm/java-1.8-openjdk/bin/java
2018-03-18 21:00:40,613 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
18-Mar-2018 21:00:45.287 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
18-Mar-2018 21:00:45.414 INFO [main] Using a shared selector for servlet write/read
18-Mar-2018 21:00:45.492 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 4181 ms
18-Mar-2018 21:00:45.511 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Tomcat-Standalone
18-Mar-2018 21:00:45.511 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.50
18-Mar-2018 21:01:13.698 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Spring WebApplicationInitializers detected on classpath: [com.atlassian.synchrony.proxy.SynchronyDispatcherServletInitializer@4f088b64]
18-Mar-2018 21:01:19.295 WARNING [localhost-startStop-2] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [605] milliseconds.
18-Mar-2018 21:01:23.398 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'dispatcher'
18-Mar-2018 21:01:23.398 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization started
18-Mar-2018 21:01:23.488 INFO [localhost-startStop-2] Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sun Mar 18 21:01:23 GMT 2018]; root of context hierarchy
18-Mar-2018 21:01:24.492 INFO [localhost-startStop-2] Registering annotated classes: [class com.atlassian.synchrony.proxy.websocket.WebSocketConfig,class com.atlassian.synchrony.proxy.web.SynchronyWebMvcConfig]
2018-03-18 21:01:27,796 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 6.7.2 [build 7601 based on commit hash 2b9cef12215b66d36aac7298ee6598161e5b8cbb] - synchrony version 2.1.0-release-confluence_6.5-1a01ab2d
18-Mar-2018 21:01:37.890 INFO [localhost-startStop-2] org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.initialize Initializing ExecutorService 'defaultSockJsTaskScheduler'
18-Mar-2018 21:01:38.890 INFO [localhost-startStop-2] Mapped URL path [/v1/bayeux-sync1] onto handler of type [class]
18-Mar-2018 21:01:46.591 INFO [localhost-startStop-2] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sun Mar 18 21:01:23 GMT 2018]; root of context hierarchy
18-Mar-2018 21:01:48.698 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]
18-Mar-2018 21:01:49.094 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)
18-Mar-2018 21:01:49.096 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()
18-Mar-2018 21:01:51.197 INFO [localhost-startStop-2] Starting beans in phase 2147483647
18-Mar-2018 21:01:51.789 INFO [localhost-startStop-2] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'dispatcher': initialization completed in 28389 ms
2018-03-18 21:02:19,497 ERROR [localhost-startStop-1] [atlassian.confluence.setup.ConfluenceConfigurationListener] contextInitialized An error was encountered while bootstrapping Confluence (see below):
at com.atlassian.spring.container.ContainerManager.getComponent(
at java.util.Iterator.forEachRemaining(
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(
at com.atlassian.confluence.setup.DefaultBootstrapManager.init(
at com.atlassian.config.util.BootstrapUtils.init(
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(
at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.startInternal(
at org.apache.catalina.util.LifecycleBase.start(
at org.apache.catalina.core.ContainerBase$
at org.apache.catalina.core.ContainerBase$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
2018-03-18 21:02:24,789 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
18-Mar-2018 21:02:25.095 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8090"]
18-Mar-2018 21:02:25.198 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 99705 ms


If anyone has a tip as to where to look next, I'd be happy. All of my searches have resulted in a basic howto of how to chmod/chown the directory. This hasn't been helpful, and I believe the error message is incorrect.


What exactly does confluence need to do to its home directory, besides write?



1 answer

0 votes

Hey @Sean,


It appears to me that the issue is coming from the Java version Confluence was referring to - for now Confluence only supports Oracle JRE/JDK and OpenJDK is not supported yet.

Could you please try to install Oracle JRE/JDK at your end and use that instead of OpenJDK to run Confluence?


Hope this helps :)

There was another thread here which seems to have been removed. In that thread I demonstrated a "working" instance if I use the same container (including the openJDK), but don't do a persistent volume.  The problem with this is without a persistent volume, every time the container starts (or is rescheduled), it comes up without attachments/database/license settings -- not usable for anything, however it does demonstrate that everything is working except the PersistentVolume.

I can't see how changing the java version would help here, though I will keep that in mind for the future.

I'm looking for why it says it can't write to /var/atlassian/confluence, when clearly it can.


I'm not sure why I can't see the other reply here, but here's a link:


Like Anton Poskrebyshev likes this

I can see that thread (I remember I got stuck on it because there is nothing in Confluence that would do this.  It has to be something with the persistent file system)

For it was resolved by setting the ownerships manually on the share...

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

903 views 11 26
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you