elasticsearch SearchPhaseExecutionException[执行阶段[query]失败,所有碎片失败],elasticsearch,logstash,windows-server-2012,kibana,elasticsearch,Logstash,Windows Server 2012,Kibana" /> elasticsearch SearchPhaseExecutionException[执行阶段[query]失败,所有碎片失败],elasticsearch,logstash,windows-server-2012,kibana,elasticsearch,Logstash,Windows Server 2012,Kibana" />

elasticsearch SearchPhaseExecutionException[执行阶段[query]失败,所有碎片失败]

elasticsearch SearchPhaseExecutionException[执行阶段[query]失败,所有碎片失败],elasticsearch,logstash,windows-server-2012,kibana,elasticsearch,Logstash,Windows Server 2012,Kibana,最近,我们的服务器在没有正确关闭Elastic Search/Kibana的情况下重新启动。重启后,两个应用程序都在运行,但不再创建索引。我在调试模式下检查了logstash设置,它正在向Elastic Search发送数据 现在,我创建的所有窗口都报告此错误: Oops! SearchPhaseExecutionException[Failed to execute phase [query], all shards failed] 我尝试重新启动Elastic Search/Kibana,

最近,我们的服务器在没有正确关闭Elastic Search/Kibana的情况下重新启动。重启后,两个应用程序都在运行,但不再创建索引。我在调试模式下检查了logstash设置,它正在向Elastic Search发送数据

现在,我创建的所有窗口都报告此错误:

Oops! SearchPhaseExecutionException[Failed to execute phase [query], all shards failed]
我尝试重新启动Elastic Search/Kibana,并清除了一些索引。我搜索了很多,但无法正确地解决这个问题

当前群集运行状况状态为红色,如图所示

关于如何排除故障的任何帮助都是向上投票的。多谢各位

编辑:

我在日志中关注的是:

[2015-05-06 15:13:48,059][DEBUG][action.search.type       ] All shards failed for phase: [query]



{
  "cluster_name" : "elasticsearch",
  "status" : "red",
  "timed_out" : false,
  "number_of_nodes" : 8,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 120,
  "active_shards" : 120,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 310
}

您有许多损坏的translog文件,需要删除这些文件。您可以在
data/{clustername}/nodes/0/index/logstash-2015.04.21/4/translog
中找到它,在
data/{clustername}/nodes/0/index/logstash-2015.03.16/1/translog
中找到另一个。也许还有其他人,但我可以从你提供的片段中看出这一点。当然,将丢失translog文件中的内容

如果索引不再有索引文件(只有
\u state
文件夹存在于
data/{clustername}/nodes/0/index/[index\u name]
下),这意味着该索引中不再有数据,此时您可以删除该索引。如果仍然需要数据,则需要重新编制该数据的索引。如果决定删除索引,则需要关闭节点并删除
data/{clustername}/nodes/0/index
下的索引文件夹,这些文件夹与您提到的文件夹类似(为空,仅包含
\u state
文件夹)

  • 尝试删除索引并重新创建。有时会有帮助

  • 或者,您可能正试图在同一查询中查询
    int
    string
    字段


  • 如果您碰巧知道,如何转到Mac上的data/{clustername}文件夹?在我的情况下,我的光盘已被100%占用。我增加了音量并重新启动了实例。成功了!我不得不删除索引并重建4次,直到它工作为止。汉克斯,我用字符串字段在术语查询中搜索int字段,修复了这个问题,解决了这个错误
    [2015-05-06 15:13:48,059][DEBUG][action.search.type       ] All shards failed for phase: [query]
    
    
    
    {
      "cluster_name" : "elasticsearch",
      "status" : "red",
      "timed_out" : false,
      "number_of_nodes" : 8,
      "number_of_data_nodes" : 1,
      "active_primary_shards" : 120,
      "active_shards" : 120,
      "relocating_shards" : 0,
      "initializing_shards" : 0,
      "unassigned_shards" : 310
    }