On 3/7/2016 3:15 PM, Steven White wrote:
> In Solr's solr-8983-console.log I see the following (about 50 in a span of
> 24 hours when index is on going):
>
>     WARNING: Couldn't flush user prefs:
> java.util.prefs.BackingStoreException: Couldn't get file lock.

This is not directly related to Solr.  It's a problem in something that
looks like it's part of Java.  I have very little idea about what causes
it, but google finds other people with this log message, in connection
with software other than Solr.

Some information I found suggests one thing that *MIGHT* explain both
problems you mentioned:  Trying to share an index directory between
multiple Solr instances or cores.  Don't try to do that.  Lucene and
Solr are designed around exclusive access to the index directory.

>     118316292 [qtp114794915-39] ERROR org.apache.solr.core.SolrCore  [
> test_idx] ? java.lang.IllegalStateException: file:
> MMapDirectory@/b/vin291f1/vol/vin291f1v3/idx/solr_index/test/data/index
> lockFactory=org.apache.lucene.store.NativeFSLockFactory@169f6ad3 appears
> both in delegate and in cache: cache=[_2omj.fnm, _2omg_Lucene50_0.doc,
> ........ _2omg.nvm],delegate=[write.lock, _1wuk.si, ........ segments_2b]
>         at
> org.apache.lucene.store.NRTCachingDirectory.listAll(NRTCachingDirectory.java:103)
>
> What does it mean?
>
> I _think_ the error log is due to the NAS drive being disconnected before
> shutting down Solr, but I need a Solr expect to confirm.

This is a low-level Lucene error in the caching Directory implementation
that Solr uses by default.  Basically, segment files should either be
sitting in memory (the cache) or on the disk -- never both.  This should
not happen if the index directory is only being used by one Solr
instance and core.

I did find some issues filed against Solr that showed this problem in
relation to frequent checking of Solr's informational APIs:

https://issues.apache.org/jira/browse/SOLR-7785
https://issues.apache.org/jira/browse/SOLR-8630

This error message has also turned up in relation to Solr indexes stored
on HDFS, but I don't think that applies here.

HDFS is the only network filesystem with explicit support in Solr, but
even when using HDFS, one directory should not be shared by more than
one Solr instance or core.  Other network filesystems like NFS and SMB
(which I bring up because you mentioned NAS) are not well-supported by
Lucene/Solr, and definitely should not be used to share index directories.

Thanks,
Shawn

Reply via email to