服务器宕机后,es出现unassigned shards,使用reroute 命令提示 shard has exceeded the maximum number of retries,即使加上 retry_failed=true参数也无法解决 。经过多次尝试和网上查询,发现通过以下步骤可以解决该问题:

  1. 禁用allocation配置

    PUT _cluster/settings
    {"persistent": {"cluster.routing.allocation.enable": "none"}
    }
    
  2. 重置计数器
   POST /_cluster/reroute?retry_failed=true
  1. 执行reroute命令

    POST /_cluster/reroute
    {"commands": [{"allocate_replica": {"index": "xx","shard": 0,"node": "AQ7l1ti9RqejnLg2HN0q1A"}}]
    }
    
  2. 启用allocation配置
   PUT _cluster/settings{"persistent": {"cluster.routing.allocation.enable": "all"}}

es unassigned shards 解决相关推荐

  1. Elasticsearch unassigned shards解决方法

    当在 Elasticsearch 中出现未分配的碎片(unassigned shards)时,可以尝试以下几种解决方法: 手动重新分配:可以尝试手动将未分配的碎片重新分配给集群中可用的节点.可以使用 ...

  2. Elasticsearch unassigned shards的解决之道

    出现这种提示,说明你的集群状态是亚健康的,status是yellow,至少有一个副本分片没有成功创建,集群是能正常工作的,只是有丢失数据的风险. 一,问题定位 解决思路,首先查清楚问题所在,es提供一 ...

  3. ES shard unassigned的解决方法汇总

    ES shard unassigned的解决方法汇总 参考文章: (1)ES shard unassigned的解决方法汇总 (2)https://www.cnblogs.com/bonelee/p/ ...

  4. es大量unassigned shards

    原文地址:http://www.wklken.me/posts/2015/05/23/elasticsearch-issues.html 今天惯例看统计报表, 才发现es集群悲剧了......昨天下午 ...

  5. Reroute Unassigned Shards——遇到主shard 出现的解决方法就是重新路由

    Red Cluster! 摘自:http://blog.kiyanpro.com/2016/03/06/elasticsearch/reroute-unassigned-shards/ There a ...

  6. [unassigned_shards]Fix issue: elasticsearch unassigned shards

    今天遇到了一个elasticsearch相关的坑[unassigned shards],蹚完了,记录一下(详细的解释在中下方,耐心看完). 1.先确保elasticsearch(后简称es)处于启动状 ...

  7. How to resolve unassigned shards in Elasticsearch——写得非常好

    How to resolve unassigned shards in Elasticsearch 转自:https://www.datadoghq.com/blog/elasticsearch-un ...

  8. Recovering unassigned shards on elasticsearch 2.x——副本shard可以设置replica为0在设置回来...

    Recovering unassigned shards on elasticsearch 2.x 摘自:https://z0z0.me/recovering-unassigned-shards-on ...

  9. Diagnose unassigned shards

    Diagnose unassigned shards Diagnose unassigned shards | Elasticsearch Guide [8.6] | Elastic

最新文章

  1. 百度:请叫我卡车新势力
  2. Ocelot 集成Butterfly 实现分布式跟踪
  3. python读文件en_python 点云las、laz文件的读取、写入、压缩
  4. imac android studio,Mac安装Android Studio的时候忘记安装Avd Manager怎么办?
  5. 注意力测试软件系统,儿童注意力训练评估软件 - 训练评估软件 - 唯普诺心理,心理测评系统,心理测评软件,婴幼儿智能发育,心理软件...
  6. 【转】const int *p和int * const p的区别(常量指针与指向常量的指针)
  7. PAT乙级(1022 D进制的A+B )
  8. Google将Material Design带到CSS、HTML与JavaScript上
  9. Tomcat 日志文件分割
  10. CodeForces 980 E The Number Games
  11. 顶级域名、一级域名、二级域名、三级域名的区别
  12. 《自控力》-- 精华摘抄
  13. 简单观察HoudiniAssetComponent状态(AssetState)的变化过程
  14. Rpgmakermv(16) YEP MainmenuManager
  15. 使用fdisk进行磁盘分区
  16. 程序员是否可以在家办公——在家办公的利与弊
  17. 微信浏览器 点击 出现卡顿现象及解决方案
  18. android 9.0 Settings系统默认字体大小的修改
  19. grafana 配置详解
  20. Linux——DNS(正向解析+反向解析+多域配置+主从配置)

热门文章

  1. 探索MediaPipe的人像分割
  2. FlexPaper显示swf文件示例和参数设置
  3. 密码学——RSA加密算法原理
  4. 有关Chill的各种地道表达
  5. QT环境中 _TCHAR 和 QString 互相转换
  6. 2022电工(初级)练习题及答案
  7. C++判断字符串是否相等
  8. linux之fdisk命令
  9. 2小时5台3389肉鸡,国人网络安全意思真差
  10. 单字节字符串、宽字符串和多字节字符串