elasticsearch5.0.1集群索引分片丢失的处理
问题描述:
索引label的0分区的主分区和复制分区全部丢失,集群状态是红色,并且新的数据无法写入
如下
curl 192.168.0.11:9200/_cat/shards
label 0 p UNASSIGNED
label 0 r UNASSIGNED
解决思路:
将现有的数据备份出来,然后重新导入
具体步骤:
1.先备份数据和mapping:
# 备份mapping
elasticdump --ignore-errors=true --scrollTime=120m --bulk=true --input=http://192.168.0.11:9200/label --output=label_mapping.json --type=mapping
# 备份数据
elasticdump --ignore-errors=true --scrollTime=120m --bulk=true --input=http://192.168.0.11:9200/label --output=label_data.json --type=data
2.删除现有的voice:live:logout索引
curl -X DELETE http://192.168.0.11:9200/label
3.再次导入刚才备份的数据
# 导入mapping
elasticdump --input=label_mapping.json --output=http://192.168.0.11:9200/label --type=mapping
# 导入数据
elasticdump --input=label_data.json --output=http://192.168.0.11:9200/label --type=data
可以看到集群恢复了
$ curl 192.168.0.11:9200/_cluster/health?pretty
{
"cluster_name" : "chinasoft_es",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 11,
"number_of_data_nodes" : 10,
"active_primary_shards" : 91,
"active_shards" : 182,
"relocating_shards" : 2,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
elasticsearch5.0.1集群索引分片丢失的处理的更多相关文章
- elasticsearch5.0.1集群一次误删除kibana索引引发的血案
elasticsearch集群中一次删除kibana索引引发的血案 1.问题发生的过程: 早上的时候有某个索引无法看到报表数据,于是就点该报表多次,估计集群被点挂了,报错:Elasticsearch ...
- elasticsearch5.0.1集群排错的几个思路总结
1.首先查看集群整体健康状态 # curl -XGET http://10.27.35.94:9200/_cluster/health?pretty { "cluster_name" ...
- MongoDB 3.0 常见集群的搭建(主从复制,副本集,分片....)
一.mongodb主从复制配置 主从复制是mongodb最常用的复制方式,也是一个简单的数据库同步备份的集群技术,这种方式很灵活.可用于备份,故障恢复,读扩展等. 最基本的设置方式就是建立一个主节 ...
- Redis 3.0 Cluster集群配置
Redis 3.0 Cluster集群配置 安装环境依赖 安装gcc:yum install gcc 安装zlib:yum install zib 安装ruby:yum install ruby 安装 ...
- ElasticSearch-5.3.1集群环境搭建,安装ElasticSearch-head插件,安装错误解决
说起来甚是惭愧,博主在写这篇文章的时候,还没有系统性的学习一下ES,只知道可以拿来做全文检索,功能很牛逼,但是接到了任务不想做也不行, leader让我搭建一下分布式的ES集群环境,用来支持企业信用数 ...
- Mongodb集群与分片 1
分片集群 Mongodb中数据分片叫做chunk,它是一个Collection中的一个连续的数据记录,但是它有一个大小限制,不可以超过200M,如果超出产生新的分片. 下面是一个简单的分片集群 ...
- MongoDB集群搭建-分片
MongoDB集群搭建-分片 一.场景: 1,机器的磁盘不够用了.使用分片解决磁盘空间的问题. 2,单个mongod已经不能满足写数据的性能要求.通过分片让写压力分散到各个分片上面,使用分片服务器自身 ...
- Redis 5.0.5集群搭建
Redis 5.0.5集群搭建 一.概述 Redis3.0版本之后支持Cluster. 1.1.redis cluster的现状 目前redis支持的cluster特性: 1):节点自动发现 2):s ...
- windows安装elasticsearch服务以及elasticsearch5.6.10集群的配置(elasticsearch5.6.10配置跟1.1.1的配置不太相同,有些1.1.1版本下的配置指令在5.6.10中不能使用)
1.下载elasticsearch5.6.10安装包 下载地址为: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearc ...
随机推荐
- 2019红帽杯部分wp
xx 程序首先取输入的前4个字符作为xxtea加密的密钥之后进行xxtea加密.接着进行位置置换操作,然后又进行了以3个为一组的异或 首先逆向解出xxtea加密之后的结果 #include<st ...
- Arrays.asList 存在的坑
引语: 阿里巴巴java开发规范说到使用工具类Arrays.asList()方法把数组转换成集合时,不能使用其修改集合相关的方法,它的add/remove/clear方法会抛出UnsupportedO ...
- web 字体 font-family
body { font-family: -apple-system, //针对 Web 页面 BlinkMacSystemFont, //针对 Mac Chrome 页面 SFProDisplay, ...
- 012——matlab判断变量是否存在
(一)参考文献:https://www.ilovematlab.cn/thread-48319-1-1.html (二) clc clear a = exist('a') ans =1 clc cle ...
- php+ tinymce粘贴word
最近公司做项目需要实现一个功能,在网页富文本编辑器中实现粘贴Word图文的功能. 我们在网站中使用的Web编辑器比较多,都是根据用户需求来选择的.目前还没有固定哪一个编辑器 有时候用的是UEditor ...
- AtCoder Grand Contest 011题解
传送门 \(A\) 直接按时间排序之后贪心就可以了 const int N=1e5+5; int a[N],q[N],c,k,h,t,n,res; inline int min(R int x,R i ...
- 记一次清理缓存的小事情(chrome) chrome下清理缓存不生效的问题
记一次清理缓存的小事情(chrome) chrome下清理缓存不生效的问题 前端开发中会经常涉及清理缓存的事情. 在一次开发后, 需要清理缓存,一个哥们怎么清理都不生效, 于是向我求救. 在我看了下后 ...
- Jmeter 5.1实现图片上传接口测试
背景: 项目过程中需要抓取接口进行图片上传的接口测试,所有上传功能大同小异,无非就是参数内容不同,此处记录一下,为其他上传做一些参考 1.通过fiddler抓取到的参数如下: Content-Disp ...
- 什么是amcl
amcl是一种机器人在2D中移动的概率定位系统. 它实现了自适应(或KLD采样)蒙特卡罗定位方法(如Dieter Fox所述),该方法使用粒子滤波器来针对已知地图跟踪机器人的位姿. 参考: https ...
- 1.xml解析
public static void main(String[] args) throws DocumentException { SAXReader saxReader = new ...