处理 unassigned shard
#查看所有分片
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的更多相关文章
- ES 遇到 unassigned shard如何处理?
解决方法:(1)如果是红色的,可以直接分片shard给你认为有最新(或最多)数据的节点.见下: 摘自:https://discuss.elastic.co/t/how-to-resolve-the-u ...
- Reroute Unassigned Shards——遇到主shard 出现的解决方法就是重新路由
Red Cluster! 摘自:http://blog.kiyanpro.com/2016/03/06/elasticsearch/reroute-unassigned-shards/ There a ...
- 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 ...
- elasticsearch 产生未分配分片的原因(es官网)
Reasons for unassigned shard: These are the possible reasons for a shard to be in a unassigned state ...
- ES shard unassigned的解决方法汇总
说下shard出现的几个状态说明: relocating_shards shows the number of shards that are currently moving from one no ...
- Recovering unassigned shards on elasticsearch 2.x——副本shard可以设置replica为0在设置回来
Recovering unassigned shards on elasticsearch 2.x 摘自:https://z0z0.me/recovering-unassigned-shards-on ...
- 磁盘空间引起ES集群shard unassigned的处理过程
1.问题描述 早上醒来发现手机有很多ES状态为red的告警,集群就前几天加了几个每天有十多亿记录的业务,当时估算过磁盘容量,应该是没有问题的,但是现在集群状态突然变成red了,这就有点懵逼了. 2.查 ...
- Elasticsearch强制重置未分配的分片(unassigned)
强制重置未分片的分片,这个问题源自于Elasticsearch维护中,Node意外退出的场景. 意外退出后Elasticsearch由于网络原因或者jvm性能压力,未能短时间内分配分片. 看一下分片的 ...
- 记一次ElasticSearch重启之后shard未分配问题的解决
记一次ElasticSearch重启之后shard未分配问题的解决 环境 ElasticSearch6.3.2,三节点集群 Ubuntu16.04 一个名为user的索引,索引配置为:3 primar ...
随机推荐
- docker容器网络—单主机容器网络
当我们在单台物理机或虚拟机中运行多个docker容器应用时,这些容器之间是如何进行通信的呢,或者外界是如何访问这些容器的? 这里就涉及了单机容器网络相关的知识.docker 安装后默认 情况下会在宿主 ...
- MP的自动填充功能
用来进行自动填充时间. 使用注解@TableTield(fill=FieldFill.insert)插入时进行性填充 使用注解@TableTield(fill=FieldFill.Update)更新时 ...
- 201871010104-陈园园 《面向对象程序设计(java)》第十二周学习总结
201871010104-陈园园 <面向对象程序设计(java)>第十二周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ ...
- 201871010107-公海瑜《面向对象程序设计(java)》第十周学习总结
201871010107-公海瑜<面向对象程序设计(java)>第十周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这 ...
- Nginx内置变量以及日志格式变量
$args #请求中的参数值$query_string #同 $args$arg_NAME #GET请求中NAME的值$is_args #如果请求中有参数,值为"?",否则为空字符 ...
- docker 持久化存储
1.data Volume mysql5.7:dockerfile FROM debian:stretch-slim # add our user and group first to make s ...
- VMware虚拟机安装使用及系统安装教程
虚拟机是利用软件来模拟出完整计算机系统的工具.具有完整硬件系统功能的.运行在一个完全隔离环境中.虚拟机的使用范围很广,如未知软件评测.运行可疑型工具等,即使这些程序中带有病毒,它能做到的只有破坏您的虚 ...
- HttpRequestMessage扩展方法
public static class HttpRequestMessageExtensions { /// <summary> /// Gets the <see cref=&qu ...
- webapi序列化控制
我们都知道在使用WebApi的时候Controller会自动将Action的返回值自动进行各种序列化处理(序列化为json,xml等),但是如果Controller的自动序列化后的结果不是我们想要的该 ...
- web框架--tornado自定义分页
1.tornado_main.py #!/usr/bin/env python # -*- coding: utf-8 -*- import tornado.web import tornado.io ...