1. 程式人生 > >Caused by: org.apache.solr.common.SolrException: Index locked for write for core XXX 異常解決

Caused by: org.apache.solr.common.SolrException: Index locked for write for core XXX 異常解決

Caused by: org.apache.solr.common.SolrException: Index locked for write for core XXX
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
    at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
    at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    ... 1 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Index locked for write for core XX        at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:484)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:745)
    ... 13 more

solr庫被鎖住了

也是網上一個大神的方法,Delete file write.lock in folder /data/index/ for your core then restart tomcat. It will work.

就是在solr中你被鎖住的那個庫,/data/index中刪掉write.lock solr就可以正常運行了