Confluence does not start due to 'Unable to clean the cache directory' error
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
問題
Confluence is unable to start despite working previously.
atlassian-confluence.log
に次のエラーが返される。
2011-07-30 12:35:14,918 ERROR [main] [ContainerBase.[Standalone].[localhost].[/]] log Exception sending context initialized event to listener instance of class com.atlassian.config.bootstrap.BootstrappedContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'bundledPluginLoader' while setting constructor argument with index 1 with key [50]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bundledPluginLoader' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'osgiPluginFactory' while setting constructor argument with index 1 with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'osgiPluginFactory' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'osgiPersistentCache' while setting constructor argument with index 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'osgiPersistentCache': FactoryBean threw exception on object creation; nested exception is com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /usr/local/confluence-data/plugins-osgi-cache/felix
:
:
Caused by: com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /usr/local/confluence-data/plugins-osgi-cache/felix
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91)
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37)
at com.atlassian.confluence.plugin.spring.OsgiPersistentCacheFactory.getObject(OsgiPersistentCacheFactory.java:23)
:
:
Caused by: java.io.IOException: Unable to delete file: /usr/local/confluence-data/plugins-osgi-cache/felix/felix-cache/bundle0/bundle.id
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87)
... 66 more
診断
When doing a directory listing of ls -la
in <confluence home>/plugins-osgi-cache/felix
you can see that the jar files in this directory are owned by different users. A typical scenario is they are owned by root and 'confluence' users.
原因
Confluence is not able to load/delete some of the plugin jar files in the <confluence home>/plugins-osgi-cache/felix
folder because of permission issue.
ソリューション
- Remove the
<confluence home>/plugins-osgi-cache/felix
folder- You may need to clear the entire plugins cache, not just the
<confluence home>/plugins-osgi-cache/felix
- You may need to clear the entire plugins cache, not just the
- Depending on the OS, perform the following:
- For Linux: Restart Confluence as a 'confluence' user. Which is a non-root user created by your system admin to start Confluence.
- For Windows: Right click on
<Confluence_Home>
and hit Properties. Navigate to the Security Tab and make sure that the user running Confluence has Full Control of this folder. Then startup Confluence again