#查看所有分片

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. 奇怪的ifcfg-eth0被自动还原

    最近,一台虚拟机是从外网下载的,然后导入本地测试环境使用. 发现一个奇怪的问题:修改了 /etc/sysconfig/network-scripts/ifcfg-eth0 保存后, 重启网络服务( s ...

  2. 其他综合-CentOS 7 使用二进制包搭建lnmp平台

    CentOS 7 使用二进制包搭建lnmp平台 1.实验描述 通过二进制搭建 lnmp 平台,实现 web 环境基本部署 2.实验环境 虚拟机: 系统:CenOS 7.6 内存:2 G+ 数量:1台 ...

  3. OpenGL入门(一):使用GLFW创建简单的窗口

    如果使用QT,那么创建一个OpenGL渲染窗口其实很容易,不过出于初学的角度,使用GLFW库来创建新窗口. 1. 下载并配置GLFW GLFW是一个专门针对OpenGL的C语言库,它提供了一些渲染物体 ...

  4. python cookie登录DVWA,phpstudy搭建DVWA参考https://www.jianshu.com/p/97d874548300

    import requestsheader={"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleW ...

  5. Windows解决端口占用问题

    Windows解决端口占用问题 步骤 1. win + R,输入cmd回车进入dos界面 2. 输入netstat -ano|findstr 8080 查看占用8080端口的进程 3. 输入taskk ...

  6. SpringBoot 指定资源文件的位置

    SpringBoot默认的存放静态资源文件的位置是在: 里面的. 注:SpringBoot中的src/main/resources/资源文件夹对应classpath:. 默认存放静态资源文件的位置,在 ...

  7. myeclipse开发工具的简单使用

    一.使用eclipse.myeclipse开发JAVA程序 将程序开发环境和调试环境集合在一起,提高开发效率 1.创建java项目2.创建程序包3.编写JAVA源程序4.运行JAVA程序 二.程序移植 ...

  8. ESP8266 LUA脚本语言开发: 准备工作-LUA开发说明

    前言 开发Lua需要使用这个软件 注:该软件需要按照JDK  即 JAVA虚拟机,如果没有安装过JDK,请先看JDK安装教程安装JDK USB线连接开发板接入电脑 选择自己的串口号 波特率115200 ...

  9. Emacs奇技淫巧

    奇技快捷键 C-t: 交换两个字符的位置 M-t: 交换两个字符的位置 C-x, C-t: 则是交换两行的位置 C-x, h: 全选 M-/: 匹配这个首字母的单词 M-c: 将下一个单词开头大写, ...

  10. [LeetCode] 30. Substring with Concatenation of All Words 串联所有单词的子串

    You are given a string, s, and a list of words, words, that are all of the same length. Find all sta ...