今天惯例看统计报表, 才发现es集群悲剧了......昨天下午到今天早上, 持续报错, 写了1G的错误日志>_<#(暂无监控....)
当前状态: 单台机器, 单节点(空集群), 200W 数据, 500+shrads, 约3G大小
以下是几个问题的处理过程
大量unassigned shards
其实刚搭完运行时就是status: yellow
(所有主分片可用,但存在不可用的从分片), 只有一个节点, 主分片启动并运行正常, 可以成功处理请求, 但是存在unassigned_shards
, 即存在没有被分配到节点的从分片.(只有一个节点.....)
.当时数据量小, 就暂时没关注. 然后, 随着时间推移, 出现了大量unassigned shards
curl -XGET http://localhost:9200/_cluster/health\?pretty
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 2,
"number_of_data_nodes" : 1,
"active_primary_shards" : 538,
"active_shards" : 538,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 558,
&