user1050619
user1050619

Reputation: 20896

SOLR java.io.IOException: cannot uncache file

Im using a SOLR index and when I try to insert a row into the db I get the following error,

Can anyone let me know why I get this error and how to fix it?

Error:-

[qtp191908836-19] ERROR org.apache.solr.core.SolrCore  – java.io.IOException: cannot uncache file="_t0_Lucene41_0.pos": it was separately also created in the delegate directory
        at org.apache.lucene.store.NRTCachingDirectory.unCache(NRTCachingDirectory.java:297)
        at org.apache.lucene.store.NRTCachingDirectory.sync(NRTCachingDirectory.java:216)
        at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4109)
        at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2809)
        at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2897)
        at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:2872)
        at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:549)
        at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:95)
        at org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(UpdateRequestProcessor.java:64)
        at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(DistributedUpdateProcessor.java:1240)
        at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(DistributedUpdateProcessor.java:1219)
        at org.apache.solr.update.processor.LogUpdateProcessor.processCommit(LogUpdateProcessorFactory.java:157)
        at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:266)
        at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173)

Upvotes: 2

Views: 577

Answers (1)

Mikz
Mikz

Reputation: 700

Backup your core in case of something going wrong and then delete the file that's mentioned in the error message. For me it worked like a charm.

(the file should be present in your_core_directory/data/index)

Upvotes: 1

Related Questions