最近,我们的服务器重新启动,但没有正确关闭Elastic Search / Kibana。重新启动后,两个应用程序都在运行,但不再创建索引。我在 Debug模式下检查了logstash设置,它正在将数据发送到Elastic Search。
现在,我创建的所有Windows均报告此错误:
Oops! SearchPhaseExecutionException[Failed to execute phase [query], all shards failed]
我尝试重新启动Elastic Search / Kibana,并清除了一些索引。我进行了很多搜索,但无法正确解决此问题。
如图所示,当前群集运行状况为红色。
关于如何解决问题的任何帮助都已获得支持。谢谢
编辑:
[2015-05-06 00:00:01,561][WARN ][cluster.action.shard ] [Indech] [logstash-2015.03.16][1] sending failed shard for [logstash-2015.03.16][1], node[fdSgUPDbQB2B3NQqX7MdMQ], [P], s[INITIALIZING], indexUUID [aBcfbqnNR4-AGEdIR8dVdg], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[logstash-2015.03.16][1] failed to recover shard]; nested: ElasticsearchIllegalArgumentException[No version type match [101]]; ]]
[2015-05-06 00:00:01,561][WARN ][cluster.action.shard ] [Indech] [logstash-2015.03.16][1] received shard failed for [logstash-2015.03.16][1], node[fdSgUPDbQB2B3NQqX7MdMQ], [P], s[INITIALIZING], indexUUID [aBcfbqnNR4-AGEdIR8dVdg], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[logstash-2015.03.16][1] failed to recover shard]; nested: ElasticsearchIllegalArgumentException[No version type match [101]]; ]]
[2015-05-06 00:00:02,591][WARN ][indices.cluster ] [Indech] [logstash-2015.04.21][4] failed to start shard
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [logstash-2015.04.21][4] failed to recover shard
at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:269)
at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: No version type match [52]
at org.elasticsearch.index.VersionType.fromValue(VersionType.java:307)
at org.elasticsearch.index.translog.Translog$Create.readFrom(Translog.java:364)
at org.elasticsearch.index.translog.TranslogStreams.readTranslogOperation(TranslogStreams.java:52)
at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:241)
我在后勤中关心的是:
[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/indices/logstash-2015.04.21/4/translog
中找到它,在data/{clustername}/nodes/0/indices/logstash-2015.03.16/1/translog
中找到另一个。也许还有其他人,但这是我从您提供的摘录中可以看出的。当然,会丢失转记录文件中的内容。
如果索引不再具有索引文件(_state
下仅存在data/{clustername}/nodes/0/indices/[index_name]
文件夹),则意味着该索引中不再有数据,此时您可以删除索引。如果您仍然需要重新索引该数据。如果决定删除索引,则需要关闭节点并删除data/{clustername}/nodes/0/indices
下的索引文件夹,该文件夹类似于您提到的索引文件夹(空,仅包含_state
文件夹)。
关于elasticsearch - SearchPhaseExecutionException [无法执行阶段[查询],所有分片均失败],我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30073759/