2015-05-17 50 views
0

背景:Solr的文件丢失的服务器重新启动

  1. 我已经安装了谷歌Compute Engine的
  2. 我有一个自定义模式
  3. 定制的核心我已经更新了核心Bitnami Solr的图像与大约100个文件

一切都运行良好约3周。然后我决定重启服务器作为例行维护的一部分。

当我重新启动时,核心中的所有文档都消失了。核心是空的。核心配置在那里,模式配置在那里,但文件不见了。

我还检查了solr/mycore/data/index下的文件存储区,并且没有那么多。

我是Solr新手,我对它的使用非常简单,但我担心我可能做错了什么。

有人可以请告知什么可能是错误?

更新:

我观察到重装核心导致在核心的所有文件丢失。所以我想我可能会做一些不正确的术语坚持文档

更新2:

进一步阅读,我想通了,solrconfig.xml中我的autoCommit参数可能没有设置正确。所以我试着摆弄它。我将maxTime设置为1000毫秒,并将openSearcher更改为TRUE。

完成上述操作后,我尝试通过管理控制台添加一堆文件,并且出现以下错误。我很难过!

auto commit error...:java.io.FileNotFoundException: /opt/bitnami/apache-solr/solr/mycore/data/index/_0.fnm (Permission denied) 
    at java.io.FileOutputStream.open(Native Method) 
    at java.io.FileOutputStream.<init>(Unknown Source) 
    at java.io.FileOutputStream.<init>(Unknown Source) 
    at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:389) 
    at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:282) 
    at org.apache.lucene.store.NRTCachingDirectory.unCache(NRTCachingDirectory.java:247) 
    at org.apache.lucene.store.NRTCachingDirectory.sync(NRTCachingDirectory.java:182) 
    at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4528) 
    at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:3001) 
    at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3104) 
    at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3071) 
    at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:582) 
    at org.apache.solr.update.CommitTracker.run(CommitTracker.java:216) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 

回答

0

好吧,似乎你没有在磁盘上的写入权限。您应该检查是否允许运行Solr实例的操作系统用户在磁盘上写入数据。注意我对GCE一无所知,只需检查一下在Google提供的管理控制台中是否有管理文件系统权限的选项。

另一种选择是将您的索引移动到您拥有写入权限的文件系统的其他位置。

0

请确保您在Catalina中没有两个虚拟主机使用同一个solr home。我发现它在服务停止时清除索引。

相关问题