Fisheye fails to start up with unable to clean the cache directory and unable to delete file messages
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Fisheye fails to start up and the following message is logged in the Fisheye logs:
Caused by: com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /fisheye/var/osgi-cache/felix
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:81) [atlassian-plugins-osgi-4.4.3.jar:?]
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:38) [atlassian-plugins-osgi-4.4.3.jar:?]
at com.atlassian.fisheye.plugin.FishEyeDefaultOsgiPersistentCache.<init>(FishEyeDefaultOsgiPersistentCache.java:10) [fisheye.jar:?]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_292]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_292]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_292]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_292]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) [spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE]
... 167 more
Caused by: java.io.IOException: Unable to delete file: /fisheye/var/osgi-cache/felix/felix-cache/bundle0/bundle.id
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2279) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270) [commons-io-2.4.jar:2.4]
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1653) [commons-io-2.4.jar:2.4]
at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:79) [atlassian-plugins-osgi-4.4.3.jar:?]
... 174 more
The path identified in the log file will be unique to your installation.
Cause
This problem is caused by an inconsistency in the OSGI plugin cache triggered most likely by an inappropriate shutdown of the server.
Solution
Versions up to 2.9.x
Ensure the user running Fisheye has correct permissions regarding the folder hierarchy (and contained files) starting with the FISHEYE_INST/cache/plugins
folder. If the permissions are correct, do the following:
- Shutdown Fisheye.
- Delete (or move for backup purposes) the entire folder:
FISHEYE_INST/cache/plugins
(e.g./fisheye/cache/plugins
)
- Restart Fisheye.
Versions 2.10+
Ensure the user running Fisheye has correct permissions regarding the folder hierarchy (and contained files) starting with the FISHEYE_INST/cache/plugins
folder. If the permissions are correct, do the following:
- Shutdown Fisheye.
- Delete (or move for backup purposes) the entire folder:
FISHEYE_INST/var/osgi-cache
(e.g./fisheye/var/osgi-cache
)
- Restart Fisheye.