Elasticsearch cluster health: yellow unassigned shards

本文介绍如何解决Elasticsearch集群状态显示为黄色的问题。通过调整副本数量为0,可以有效解决因副本问题导致的集群健康状态不佳的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看ES各个分片的状态

$ curl -XGET http://127.0.0.1:9200/_cluster/health?pretty
{
  "cluster_name" : "elasticsearch_brew",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 350,
  "active_shards" : 350,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 3,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0
}

Elasticsearch单台,增加kibana监控,集群状态总是黄色,索引kibana副本有问题,我ES里设置了一个

直接执行下列命令,删除多余副本

curl -XPUT "http://localhost:9200/_settings" -d'
{
  "number_of_replicas" : 0
}'

 

转载于:https://www.cnblogs.com/sunxucool/p/4651496.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值