Solr 索引拉取失败
我有 solr 的主从配置。主索引将 24X7 更新。这是一个连续的过程。我的从服务器每 30 分钟后从主服务器提取索引。
问题是由于以下异常,此索引拉取失败
SnapPull 失败:org.apache.solr.common.SolrException:索引获取 失败:在 org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] 在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_26] 在 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_26] 在 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_26] 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_26] 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_26] 在 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_26] 在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26] 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26] 在 java.lang.Thread.run(Thread.java:662) [:1.6.0_26] 导致:org.apache.lucene.store.LockObtainFailedException:锁定 获取超时: SimpleFSLock@/data/solr/data/index/lucene-47510fa3e31f1e71e7408a128e1ebac1-write.lock 在 org.apache.lucene.store.Lock.obtain(Lock.java:85) [:2.9.3 951790 - 2010-06-06 01:30:55]于 org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565) [:2.9.3 951790 - 2010-06-06 01:30:55] 于 org.apache.lucene.index.IndexWriter.(IndexWriter.java:1421) [:2.9.3 951790 - 2010-06-06 01:30:55] 于 org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:191) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpdateHandler2.java:376) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:471) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:319) [:1.4.1 955763M - 标记 - 2010-06-17 18:06:42] ... 11 更多
此异常是否是由于 master 上的连续索引更新或任何其他原因导致的。我怎样才能摆脱这个异常。
提前致谢。
问候 内存
I have master - slave configuration of solr.On master index will be updated 24X7.its a continuous process.my slave pulls the index from the master after every 30 minutes.
The Problem is this index pull is failing because of the following exception
SnapPull failed : org.apache.solr.common.SolrException: Index fetch
failed : at
org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:329)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.handler.SnapPuller$1.run(SnapPuller.java:159) [:1.4.1
955763M - mark - 2010-06-17 18:06:42] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[:1.6.0_26] at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
[:1.6.0_26] at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
[:1.6.0_26] at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
[:1.6.0_26] at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
[:1.6.0_26] at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
[:1.6.0_26] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_26] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_26] at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock
obtain timed out:
SimpleFSLock@/data/solr/data/index/lucene-47510fa3e31f1e71e7408a128e1ebac1-write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:85) [:2.9.3 951790 -
2010-06-06 01:30:55] at
org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
[:2.9.3 951790 - 2010-06-06 01:30:55] at
org.apache.lucene.index.IndexWriter.(IndexWriter.java:1421)
[:2.9.3 951790 - 2010-06-06 01:30:55] at
org.apache.solr.update.SolrIndexWriter.(SolrIndexWriter.java:191)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpdateHandler2.java:376)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.handler.SnapPuller.doCommit(SnapPuller.java:471)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] at
org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:319)
[:1.4.1 955763M - mark - 2010-06-17 18:06:42] ... 11 more
Is this exception because of continuous index updation on master or any other reasons for this.how can i get rid of this.
Thanks in advance.
Regards
Ram
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为jpountz的解释是正确的。我能够通过关闭 solr Web 服务器(在我的例子中是 Jetty)并删除整个 solr 索引目录,然后重新启动来解决该问题。单独删除锁定文件并不能解决问题。
I think the explanation by jpountz is correct. I was able to resolve the issue by shutting down the solr web server (Jetty in my case) and deleting the entire solr index dir, then restarting. Deleting the lock file alone did not correct the problem.
从服务器上的锁(/data/solr/data/index/lucene-47510fa3e31f1e71e7408a128e1epac1-write.lock)有问题。例如,当 IndexWriter 打开时 Solr 崩溃时,可能会发生这种情况:在以下重新启动后,锁定文件尚未清除,因此 Solr 认为另一个 IndexWriter 正在更新索引并拒绝执行任何更改。
要解决此错误,您可以:
There is a problem with a lock (/data/solr/data/index/lucene-47510fa3e31f1e71e7408a128e1ebac1-write.lock) on your slave. This can happen, for example, when Solr crashes while an IndexWriter is open : after the following restart, the lock file has not been cleared so Solr thinks another IndexWriter is updating the index and refuses to perform any change.
To get rif of this error, you can :
我也遇到过同样的问题。我通过以下方法解决:
1.停止 Solr 和依赖的应用程序
2.rm -rf /{您的 solr 数据目录的路径}/index.*
3.rm /{您的 solr 数据目录的路径}/replication.properties
4.启动 Solr (等待 10-20 分钟,根据您的索引数据进行复制)
检查 Solr 云的状态并跟踪 solr 的日志文件。
I have also experienced the same issue. I resolved by,
1.Stop Solr and depended applications
2.rm -rf /{path to your solr data dir}/index.*
3.rm /{path to your solr data dir}/replication.properties
4.Start Solr (Wait for 10-20 minutes to replicate based on your indexed data)
Check the status of the Solr cloud and also trace the log file of solr.