Elasticsearch关于unassigned shards的查看
来源:互联网 发布:厦门市网络公章 编辑:程序博客网 时间:2024/05/20 04:13
使用ES时经常会在索引上出问题,总结一些小tips,以后遇到什么问题,以及相应的解决方案,都会慢慢增加。
关于unassigned shards的问题,一般遇到这种情况都是——重启试试。
不行的话,只能强制删除。
那么,首先得看集群状态:
curl -XGET 'http://localhost:9200/_cluster/health'
第二,看所有的shards:
curl -XGET 'http://localhost:9200/_cat/shards'
第三,看unassignded shards:
curl -XGET 'http://localhost:9200/_cat/shards' | grep UNASSIGNED
那些索引挂了的,估计也难得恢复了,很大程度上只能自求多福了。似乎有解决方案,只是颇为繁琐。
在Google的时候发现出问题的情况有很多,有人是因为空间不够了导致的问题,有些则是因为集群间通信的故障导致的。
首先检查下是不是有文档丢失,在head图形化界面里看清楚,到底文档有没有丢失。一般说来如果有丢失的话,估计很难找回来,如果没有丢失的话,可能需要做的是强行分配shard。
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ "commands": [{ "allocate": { "index": "my-index", "shard": 4, "node": "search03", "allow_primary": 1 } }]}'
曾经这么弄好过没丢失数据的分片。over!
PS:其实还有一种办法,如果你有副本,尝试将副本数量降低一个,比如replica=2降为1,也可能成功哦。
0 0
- Elasticsearch关于unassigned shards的查看
- Elasticsearch关于unassigned shards的查看
- Elasticsearch关于unassigned shards修复
- elasticsearch的unassigned shards的处理(续)
- es大量unassigned shards
- ES: resolve unassigned shards
- elsatic 出现unassigned shards的手工修复方法
- 关于kibana查询elasticsearch的index提示Courier Fetch: 4 of 6 shards failed.处理方法
- elasticsearch shard UNASSIGNED 修复
- elasticsearch外场分片找回-UNASSIGNED
- Elasticsearch的核心概念cluster/shards/replicas/recovery/gateway/discovery.zen/transport/settings/mapping等
- Optimizing Elasticsearch: How Many Shards per Index?
- ElasticSearch的状态查看
- 关于Images.xcassets/: warning: Ambiguous Content: The app icon set "XXX" has an unassigned child.的
- elasticsearch集群的状态查看
- elasticsearch查看type的mapping
- solr分布式shards的合并优化
- hibernate shards分库的实现
- POJ3268 Silver Cow Party(最短路径)
- 错误:Line 20: xmlParseEntityRef: no name(Xcode工程名包含&)
- java递归遍历文件
- 如何正确的通过 C++ Primer 学习 C++?
- dialog全屏那些事
- Elasticsearch关于unassigned shards的查看
- Android studio设置文件编码方式为UTF-8方法
- ARM平台嵌入式Linux下使用3G/4G 模块
- Yahoo! Cloud Serving Benchmark (YCSB)
- HDU 3294 Manacher模版题
- 八皇后问题(java实现)
- putty_百度百科
- javadoc 出现:错误: 编码GBK的不可映射字符
- 细聊分布式ID生成方法