Fisheye Does Not Start Due To Lock Files, fisheye.lck, write.lock
Symptoms
Fisheye/Crucible doesn't start. Messages of the following type are logged:
ERROR [main ] fisheye.app InstanceLock-acquireLock - Lock already locked <FISHEYE_INST>/fisheye.lck
ERROR [main ] fisheye.app Run-mainImpl - Another instance of FishEye and Crucible seems to be running
andProblem starting FishEye and Crucible: com.cenqua.obfuscate.<unique_identifier_here>.locking.FileLockedExternallyException: Cannot lock file in exclusive mode - already in use
andCaused by: org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: <FISHEYE_INST>/data/cache/globalfe/idx0/write.lock
E.g.:
2011-10-10 13:13:23,127 ERROR [main ] fisheye.app InstanceLock-acquireLock - Lock already locked /usr/local/fecru-2.7.3/var/fisheye.lck
2011-10-10 13:13:23,216 INFO [main ] fisheye.app PassivateManager-<init> - Cache-sizing: MAX_TOTAL_CACHE_SIZE=353457493
2011-10-10 13:13:23,296 ERROR [main ] fisheye.app Run-mainImpl - Another instance of FishEye and Crucible seems to be running
2011-10-10 13:14:08,682 ERROR [main ] fisheye.app InstanceLock-acquireLock - Lock already locked /usr/local/fecru-2.7.3/var/fisheye.lck
2011-10-10 13:14:08,712 INFO [main ] fisheye.app PassivateManager-<init> - Cache-sizing: MAX_TOTAL_CACHE_SIZE=353457493
2011-10-10 13:14:08,764 ERROR [main ] fisheye.app Run-mainImpl - Another instance of FishEye and Crucible seems to be running
2011-10-10 13:14:51,699 ERROR [main ] fisheye.app InstanceLock-acquireLock - Lock already locked /usr/local/fecru-2.7.3/var/fisheye.lck
2011-10-10 13:14:51,729 INFO [main ] fisheye.app PassivateManager-<init> - Cache-sizing: MAX_TOTAL_CACHE_SIZE=353457493
2011-10-10 13:14:51,782 ERROR [main ] fisheye.app Run-mainImpl - Another instance of FishEye and Crucible seems to be running
and
Problem starting FishEye and Crucible: com.cenqua.obfuscate.idbklzo78.locking.FileLockedExternallyException: Cannot lock file in exclusive mode - already in use
and
Caused by: org.apache.lucene.store.LockReleaseFailedException:
Cannot forcefully unlock a NativeFSLock which is held by another indexer component: XXXXXX/data/cache/globalfe/idx0/write.lock
at org.apache.lucene.store.NativeFSLock.release(NativeFSLockFactory.java:278)
at org.apache.lucene.index.IndexWriter.unlock(IndexWriter.java:4907)
at com.cenqua.fisheye.lucene.LuceneConnection$IndexHandle.killLuceneLocks(LuceneConnection.java:231)
at com.cenqua.fisheye.lucene.LuceneConnection$IndexHandle.access$1100(LuceneConnection.java:79)
at com.cenqua.fisheye.lucene.LuceneConnection.killLuceneLocks(LuceneConnection.java:591)
Cause
Two possible causes exist. Either:
- Fisheye prevents multiple instances from running on the same server and as such, creates lock files for itself as well as activity lock files for internal database activity:
- Application lock file:
fisheye.lck
- Repository lock files:
./var/cache/<repository_name_here>/idx0/write.lock
./var/cache/<repository_name_here>/idx1/write.lock
./var/cache/<repository_name_here>/idx2/write.lock
- Indexing library lock files (these store review data):
./cache/cruidx/idx1/write.lock
./cache/globalfe/idx0/write.lock
./cache/globalfe/idx1/write.lock
These files aren't properly removed if Fisheye is shutdown using an alternative method other than using the stop.bat script or if you are running Fisheye as a service, the "Stop service" feature (or if the server/application crashes). A restarting Fisheye instance won't start if it detects these leftover.lck
and.lock
files.
Or:
- Application lock file:
- A crashed instance of Fisheye can corrupt one of its internal database data files, e.g.
<FISHEYE_INST>/var/data/data0.bin
Resolution
Depending on the cause above, choose one of the resolutions below. Either:
- If you don't see any Java processes running you can safely delete these lock files (search for and delete .lck and .lock files) and try restarting your instance. Check for a running Fisheye process:
- ps -ef | grep java
- lsof | grep data*.bin
Or:
- The
data*.bin
file is an internal database data file that contains mostly user and group membership information and other data related to your settings.- If this file exists, save a backup copy.
- Replace it with a backup version OR if you don't have a backup copy, remove the file completely and it will be created anew upon successful start – note that you will have to recreate/re-do your settings in this case.
Last modified on Jul 31, 2018
Powered by Confluence and Scroll Viewport.