引起:org.apache.solr.common.SolrException:为核心写入锁定索引 [英] Caused by: org.apache.solr.common.SolrException: Index locked for write for core

查看:15
本文介绍了引起:org.apache.solr.common.SolrException:为核心写入锁定索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 solr4.3 和主/从设置,今天我收到以下错误并且 solr 停止响应.可能是什么原因造成的,

We are using solr4.3 with master/slave setup, today I got the following error and solr stopped responding. What could be causing this,

 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

推荐答案

索引似乎在索引过程中被锁定了.
通常索引中会有一个 write.lock 文件,需要将其删除才能恢复.
如果索引在两者之间中断或其他可能导致锁定文件仍在索引中的问题,则可能会发生这种情况.

It seems the index has been locked during indexing.
Usually there would be a write.lock file within the index which needs to be removed to get it back.
The conditions can occur if the indexing breaks in between or other issues which may cause to lock file to be still in the index.

检查 论坛

写锁是因为IndexWriter总是打开的在 Solr 中,甚至在奴隶上.

The write lock is due to the fact that an IndexWriter is always open in Solr even on the slaves.

检查索引锁定选项,这些选项可以处理配置中的条件.

Check for the Index Lock options which can handle the condition within configuration.

[原始链接的存档副本:https://web.archive.org/web/http://docs.lucidworks.com/display/solr/IndexConfig+in+SolrConfig ]

[An archived copy of the original link: https://web.archive.org/web/http://docs.lucidworks.com/display/solr/IndexConfig+in+SolrConfig ]

这篇关于引起:org.apache.solr.common.SolrException:为核心写入锁定索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆