Confluence doesn't start due Document base xxxxxxxxxx does not exist or is not a readable directory

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Using a EAR-WAR confluence and tomcat throws a java.lang.IllegalArgumentException and Confluence is not accessible.

The following appears in the atlassian-confluence.log:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /www_apps/tomcat/wwrvls02/webapps/manager does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4894)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5074)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)

This KB was created from a JIRA KB listed here: Unable to Access JIRA due to Document Base does not Exist or is not a Readable Directory

Cause 1

The Confluence WAR file cannot be found or the docBase parameter contains special characters. For example:

<Context path="/confluence" docBase="/www_apps/tomcat/wwrvls02/webapps/manager" debug="0" useHttpOnly="true">

Cause 2

The user that run the tomcat  does not have the sufficient permission to read the directory content.

Resolution 1

You need to modify the docBase parameter so that it is not using special characters. For example, the above configuration would be fixed with the following:

  1. Stop Tomcat.
  2. Rename the www_apps so it no longer include special characters.
  3. Update the server.xml, for example:

    <Context path="/confluence" docBase="/wwwapps/tomcat/wwrvls02/webapps/manager" debug="0" useHttpOnly="true">
  4. Start Tomcat, checking the catalina.out file to verify that it can now be started.

 

Resolution 2

You need to assign the permission/ownership of the directory:

  1. Stop Tomcat.
  2. Assign the ownership of the directory to the  User

     chown -r confluence-user /www_apps/tomcat
  3. Restart the Tomcat
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.