You may notice your
Could not maintain indexing contexts messages appearing in your Nexus logs and incorrect search results when loooking for artifacts. An increased number of these types of messages may appear if you have long running Indexing related scheduled tasks running.
2014-04-28 15:34:41 ERROR [jetty-main-thread-1] org.sonatype.nexus.events.IndexingRepositoryRegistryRepositoryEventInspector - Could not maintain indexing contexts! org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component:
The following have been known to trigger these messages.
- Backup software is obtaining a native lock on your storage directory contents and this is conflicting with the native locks that the Nexus Search implementation is trying to acquire.
- another Nexus instance is running against the same storage directory, and this other Nexus instance is acquiring conflicting locks
Remove the backup software that is acquiring the native file locks. As a stop gap, try to run the backup software at a time that does not conflict with your Nexus indexing tasks. The stop gap may not eliminate all such errors as Nexus is dynamically indexing all the time.
Use the latest versions of Nexus, which include a mechanism that prevents two Nexuses from using the same storage directory at the same time.