问题
-
使用logstash 同步mysql 到 es后,发现 同步新建的index 状态为yellow
-
查询分片状态,发现所有副本分区都是UNASSIGNED状态
curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED
or 使用elastic-head 查看集群状态可以看到
-
查看日志:
[2017-10-28 12:21:06,828][INFO ][cluster.routing.allocation.decider] [node-1] low disk watermark [85%] exceeded on [Uoy7PyXERAGZXOTjNEDGwg][node-1][/Users/baidu/IdeaProjects/git/elasticsearch2-node1/data/my-application/nodes/0] free: 12.4gb[11.1%], replicas will not be assigned to this node -
从日志可以看出是磁盘空间不够导致的, 调整磁盘最低限制解决
curl -XPUT localhost:9200/_cluster/settings -d '
{
"transient" : {
"cluster.routing.allocation.disk.threshold_enabled" : true
}
}'
curl -XPUT localhost:9200/_cluster/settings -d '
{
"transient" : {
"cluster.routing.allocation.disk.watermark.low" : 0.95
}
}'
网友评论