#查看所有分片

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. Django框架(十九)--Django rest_framework-认证组件

    一.什么是认证 只有认证通过的用户才能访问指定的url地址,比如:查询课程信息,需要登录之后才能查看,没有登录,就不能查看,这时候需要用到认证组件 二.利用token记录认证过的用户 1.什么是tok ...

  2. [TCP/IP]TCP服务端accept发生在三次握手的哪一个阶段

    TCP服务端accept发生在三次握手之后 客户端socket()==>connect()==>write()==>read()服务端socket()==>bind()==&g ...

  3. Linux-CentOS-Nginx安装

    原文转自 jerryhe326:https://www.cnblogs.com/jerrypro/p/7062101.html 一.安装准备 首先由于nginx的一些模块依赖一些lib库,所以在安装n ...

  4. jenkins自动打包生成docker镜像后自动发布并nginx代理访问

    之前曾写过docker及jenkins基础使用  https://www.cnblogs.com/xiaochangwei/category/816943.html 现在搭建环境的功能为: 1.jen ...

  5. 模仿51cto搜索框

    做这个demo遇见的问题 1==>input type=submit有默认样式 padding:1px 6px所以将他去除 2==>input submit有默认样式 去除默认边框 bor ...

  6. 1.python进行if条件相等时候的条件

    在我们进行 if == 判断的时候!其中判断的条件: 1:其值是不是一样 3:其类型是否是一样 ###二者少了任何一个都不可以 >>> pwd = 23>>> cc ...

  7. springboot常见问题

    什么是 Spring Boot? 为什么要用 Spring Boot? Spring Boot 的核心配置文件有哪几个?它们的区别是什么? Spring Boot 的配置文件有哪几种格式?它们有什么区 ...

  8. 莫烦TensorFlow_06 plot可视化

    import tensorflow as tf import numpy as np import matplotlib.pyplot as plt def add_layer(inputs, in_ ...

  9. 快速安装Rainbond——开源企业级Paas平台

    快速安装Rainbond--开源企业级Paas平台 参考:https://www.rainbond.com/docs/user-operations/install/online_install/ R ...

  10. JavaEE 项目部署方式

    一.手动部署 二.自动部署 “自动化”的具体体现:向版本库提交新的代码后,应用服务器上自动部署,用户或测试人员使用的马上就是最新的应用程序. 搭建上述持续集成环境可以把整个构建.部署过程自动化,很大程 ...