Confluence doesn't start due Document base xxxxxxxxxx does not exist or is not a readable directory
症状
Using a EAR-WAR confluence and tomcat throws a java.lang.IllegalArgumentException
and Confluence is not accessible.
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
原因 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">
原因 2
The user that run the tomcat does not have the sufficient permission to read the directory content.
ソリューション 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:
- Stop Tomcat.
- Rename the www_apps so it no longer include special characters.
Update the
server.xml
, for example:<Context path="/confluence" docBase="/wwwapps/tomcat/wwrvls02/webapps/manager" debug="0" useHttpOnly="true">
- Start Tomcat, checking the
catalina.out
file to verify that it can now be started.
ソリューション 2
You need to assign the permission/ownership of the directory:
- Stop Tomcat.
Assign the ownership of the directory to the User
chown -r confluence-user /www_apps/tomcat
- Restart the Tomcat