Visit my.sonatype.com for documentation on Nexus Repository version 2.
You may notice your
Could not maintain indexing contexts messages appearing in your Nexus Repository 2 logs and incorrect search results when looking 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 Repository 2 Search implementation is trying to acquire.
- another Nexus Repository 2 instance is running against the same storage directory, and this other Nexus Repository 2 instance is acquiring conflicting locks
Remove the backup software that is acquiring the native file locks. As a stopgap, try to run the backup software at a time that does not conflict with your Nexus Repository 2 indexing tasks. The stopgap may not eliminate all such errors as Nexus Repository 2 is dynamically indexing all the time.
Use the latest versions of Nexus Repository 2, which include mechanisms that prevent two instances from using the same storage directory at the same time.