Elasticsearch 错误 - 集群运行状况从 [黄色] 更改为 [红色](原因:[分片失败

问题描述 投票:0回答:2

我正在使用

elasticdump
使用以下命令将巨大的数据集转储到 Elasticsearch 节点中:
elasticdump --input=./xyz.json --output=http://localhost:9200/
。一切正常,但一段时间后我在控制台中看到这些错误消息:

_type: 'doc',
_id: 'lzHMQmUBQ1VCv6VBROQA',
status: 503,
error:
{ type: 'unavailable_shards_exception',
 reason: '[logstash-2018.08.16][2] primary shard is not active Timeout: 
[1m], request: [BulkShardRequest [[logstash-2018.08.16][2]] containing [31] requests]' } }

检查elasticsearch日志时,可以看到以下错误:

[2018-08-31T11:27:21,496][INFO ][o.e.c.r.a.AllocationService] [dqSwClD] Cluster health status changed from [YELLOW] to [RED] (reason: [shards failed [[logstash-2018.08.16][2]] ...]).

我不确定是什么原因导致了

shard failure
,并且多次故障排除工作已被证明是失败的。

elasticsearch sharding
2个回答
0
投票

您可以在 https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-indexing-speed.html 找到,有很多优化批量索引的技巧:

  • 禁用副本
  • 禁用几乎实时刷新(索引的
    refresh_interval
  • 等等...

0
投票

在基于Windows的堆栈elastic search.batch上执行设置 [2024-04-26T17:35:18,277][INFO ][o.c.r.a.AllocationService] [DESKTOP-565I0CO] current.health="GREEN" message="集群运行状况从 [RED] 更改为 [GREEN](原因:[分片开始[[.security-7][0]]])。” previous.health="RED" Reason="分片已启动 [[.security-7][0]]"

如何解决此消息并执行所有文件

© www.soinside.com 2019 - 2024. All rights reserved.