Unable to start fisheye with error "Failed to move old encoded content directory"
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
After starting or restarting Fisheye, it fails to start with "The Web context could not be started" and "Failed to move old encoded content directory" as the error for starting.
Diagnosis
In the fisheye logs you will see:
... 82 more
Caused by: java.lang.IllegalStateException: Failed to move old encoded content directory
at com.cenqua.crucible.revision.managers.DefaultEncodedContentProvider.clearCache(DefaultEncodedContentProvider.java:51) [fisheye.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_191]
....
Cause
This can occur when the tmp directory in FISHEYE_INST/var/tmp can get the wrong permissions or Fisheye can't modify the files anymore. One reason for this is to start the app with a different user accidentally - example root. When the app starts next with a different user - this can occur.
Solution
Please do the following:
- Stop Fisheye
- Delete the contents of FISHEYE_INST/var/tmp
- Recursively change all permissions in FISHEYE_INST and FISHEYE_HOME to the user that should be running Fisheye - this is to catch other files that might have wrong permissions now.
- After this start Fisheye