我正在使用elasticdump
通过命令elasticdump --input=./xyz.json --output=http://localhost:9200/
将巨大的数据集转储到Elasticsearch节点中。一切正常,但是一段时间后,我在控制台中看到以下错误消息:
_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
的起因是什么,并且一些故障排除工作都证明是无效的。
答案 0 :(得分:0)
您可以在https://www.elastic.co/guide/en/elasticsearch/reference/master/tune-for-indexing-speed.html上找到许多优化批量索引的技巧:
refresh_interval
)