#查看所有分片

GET _cat/shards

curl  10.1.2.2:9200/_cat/indices/iis_log* #查看索引的分片状态

#查看第一个unassigned shard的原因
GET /_cluster/allocation/explain

#查看iis_qr_2019-07索引中所有分片分配情况
GET /_cat/shards?index=iis_Log_2019-07

#查看unassigned原因:
curl noahes.isec.oa.com/_cluster/allocation/explain?pretty -d '{"index":"index-name","shard":0,"primary":true}'

GET /_cluster/allocation/explain
{
"index": "iis_log_2019-07",
"shard": 0,
"primary": true
}

#shard 自动分配达到最大重试次数5次后,执行reroute命令对分片重新路由,ElasticSearch会自动进行负载均衡
POST /_cluster/reroute?retry_failed=true

1)INDEX_CREATED:由于创建索引的API导致未分配。
2)CLUSTER_RECOVERED :由于完全集群恢复导致未分配。
3)INDEX_REOPENED :由于打开open或关闭close一个索引导致未分配。
4)DANGLING_INDEX_IMPORTED :由于导入dangling索引的结果导致未分配。
5)NEW_INDEX_RESTORED :由于恢复到新索引导致未分配。
6)EXISTING_INDEX_RESTORED :由于恢复到已关闭的索引导致未分配。
7)REPLICA_ADDED:由于显式添加副本分片导致未分配。
8)ALLOCATION_FAILED :由于分片分配失败导致未分配。
9)NODE_LEFT :由于承载该分片的节点离开集群导致未分配。
10)REINITIALIZED :由于当分片从开始移动到初始化时导致未分配(例如,使用影子shadow副本分片)。
11)REROUTE_CANCELLED :作为显式取消重新路由命令的结果取消分配。
12)REALLOCATED_REPLICA :确定更好的副本位置被标定使用,导致现有的副本分配被取消,出现未分配。

https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-allocation-explain.html

http://www.mamicode.com/info-detail-2466818.html

处理 unassigned shard的更多相关文章

  1. ES 遇到 unassigned shard如何处理?

    解决方法:(1)如果是红色的,可以直接分片shard给你认为有最新(或最多)数据的节点.见下: 摘自:https://discuss.elastic.co/t/how-to-resolve-the-u ...

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

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

  3. http://elasticsearch-py.readthedocs.io/en/master/api.html

    API Documentation All the API calls map the raw REST api as closely as possible, including the disti ...

  4. elasticsearch 产生未分配分片的原因(es官网)

    Reasons for unassigned shard: These are the possible reasons for a shard to be in a unassigned state ...

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

    说下shard出现的几个状态说明: relocating_shards shows the number of shards that are currently moving from one no ...

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

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

  7. 磁盘空间引起ES集群shard unassigned的处理过程

    1.问题描述 早上醒来发现手机有很多ES状态为red的告警,集群就前几天加了几个每天有十多亿记录的业务,当时估算过磁盘容量,应该是没有问题的,但是现在集群状态突然变成red了,这就有点懵逼了. 2.查 ...

  8. Elasticsearch强制重置未分配的分片(unassigned)

    强制重置未分片的分片,这个问题源自于Elasticsearch维护中,Node意外退出的场景. 意外退出后Elasticsearch由于网络原因或者jvm性能压力,未能短时间内分配分片. 看一下分片的 ...

  9. 记一次ElasticSearch重启之后shard未分配问题的解决

    记一次ElasticSearch重启之后shard未分配问题的解决 环境 ElasticSearch6.3.2,三节点集群 Ubuntu16.04 一个名为user的索引,索引配置为:3 primar ...

随机推荐

  1. 001-Zabbix 服务安装

    Zabbix 服务安装 [官方地址]点我快速打开文章 1.安装 Zabbix 1.1 下载 Zabbix 清华源 rpm -ivh https://mirrors.tuna.tsinghua.edu. ...

  2. echo和printf打印输出

    [root@node2 scprits]# echo Hello World! Hello World! [root@node2 scprits]# echo 'Hello World!' Hello ...

  3. SysML——CSE 599W: Systems for ML

    CSE 599W: Systems for ML Assignments Materials Projects Schedule Schedule The schedule is tentative ...

  4. wal2json pg扩展centos7构建

    使用wal2json可以将pg 变动输出为json 格式,是一个pg 扩展,支持pg9.4+ 目前看到netflix 的dblog 对于pg 的支持就是基于此插件 以下是关于centos 7的构建说明 ...

  5. Codeforces Round #545 (Div. 2) E 强连通块 + dag上求最大路径 + 将状态看成点建图

    https://codeforces.com/contest/1138/problem/E 题意 有n个城市(1e5),有m条单向边(1e5),每一周有d天(50),对于每个城市假如在某一天为1表示这 ...

  6. Appium入门指南 - 环境搭建和Case编写

    本文档将详细介绍如何搭建 Appium 的运行环境,以及如何编写一个简单的 UI 自动化测试用例.其中,也会穿插讲解一些 Appium 的基本知识.关于 Appium 的更多信息,大家可以查看官方文档 ...

  7. 测开面试 | Python语言常见问题

    1.面向对象的概念? 面向对象编程,简称OOP,是一种程序设计思想 主要包括:类.继承.多态(子类方法覆盖父类方法).实例.属性.方法 2.什么是进程.线程.协程? 进程:独立数据空间,进程间不共享数 ...

  8. 来吧!一文彻底搞定Vue组件!

    作者 | Jeskson 来源 | 达达前端小酒馆 Vue组件的概述 组件是什么呢,了解组件对象的分析,Vue组件中的data属性,props传递数据的原理到底是什么. 事件通信的那些事 如何了解父子 ...

  9. [LeetCode] 301. Remove Invalid Parentheses 移除非法括号

    Remove the minimum number of invalid parentheses in order to make the input string valid. Return all ...

  10. [LeetCode] 187. Repeated DNA Sequences 求重复的DNA序列

    All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACG ...