最近我们的服务器在没有正确关闭Elastic Search/Kibana的情况下重新启动。重新启动后,两个应用程序都在运行,但不再创建索引。我在调试模式下检查了logstash设置,它正在向Elastic Search发送数据。
现在我创建的所有窗口都报告此错误:
Oops! SearchPhaseExecutionException[Failed to execute phase [query], all shards failed]
我尝试重新启动ElasticSearch/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
}
3条答案
按热度按时间2skhul331#
你有许多损坏的translog文件,你需要删除。你可以在
data/{clustername}/nodes/0/indices/logstash-2015.04.21/4/translog
和另一个在data/{clustername}/nodes/0/indices/logstash-2015.03.16/1/translog
中找到它。也许还有其他的,但这是我可以告诉从你提供的片段。当然,将失去什么是在translog文件。如果索引不再有索引文件(
data/{clustername}/nodes/0/indices/[index_name]
下只存在_state
文件夹)这意味着该索引中不再有数据,此时您可以删除该索引。如果您仍然需要该数据,则需要重新索引该数据。如果您决定删除索引,您需要关闭该节点并删除data/{clustername}/nodes/0/indices
下的索引文件夹,这些文件夹与您提到的文件夹类似(空的,只包含_state
文件夹)。9ceoxa922#
1.尝试删除索引并重新创建。有时会有帮助。
1.或者,您可能尝试在同一个查询中查询
int
和string
字段。ssgvzors3#
如果未定义索引的IndexTemplate,也会出现此错误。