前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ES集群分片无法迁移,手动move仍然报错怎么办?

ES集群分片无法迁移,手动move仍然报错怎么办?

原创
作者头像
WeldonWang
修改2023-03-09 22:08:09
1.2K0
修改2023-03-09 22:08:09
举报

一、先看两个报错

代码语言:txt
复制
{
    "status":400,
    "body":{
        "error":{
            "root_cause":[
                {
                    "type":"illegal_argument_exception",
                    "reason":"[move_allocation] can't move 0, from {1667208150001223332}{jQ6N4UQGT1qh5W4Yb1HWRw}{F5DnVEDwSuO3e33wRS8Hgw}{192.168.1.1}{192.168.1.1:9300}{ilrstw}{ml.machine_memory=16512847872, rack=cvm_4_200005, xpack.installed=true, set=200005, transform.node=true, ip=172.16.0.1, ml.max_open_jobs=512, ml.max_jvm_size=8589934592, region=4}, to {1677232737001267632}{alswNrDsTtu4dUrcZVYzfQ}{UQfi6og7S7qHgui-cWuRjg}{192.168.1.2}{192.168.1.2:9300}{ilrstw}{ml.machine_memory=33398218752, rack=cvm_4_200005, xpack.installed=true, set=200005, transform.node=true, ip=172.16.0.3, ml.max_open_jobs=512, ml.max_jvm_size=17179869184, region=4}, since its not allowed, reason: [YES(shard has no previous failures)][YES(shard is primary and can be allocated)][YES(explicitly ignoring any disabling of allocation due to manual allocation commands via the reroute API)][YES(can relocate primary shard from a node with version [7.14.2] to a node with equal-or-newer version [7.14.2])][YES(no snapshots are currently running)][YES(ignored as shard is not being recovered from a snapshot)][YES(this node is not currently shutting down)][NO(node does not match index setting [index.routing.allocation.require] filters [_id:\"jQ6N4UQGT1qh5W4Yb1HWRw\"])][YES(this node does not hold a copy of this shard)][YES(enough disk for shard on node, free: [3.2tb], shard size: [889.9mb], free after allocating shard: [3.2tb])][YES(below shard recovery limit of outgoing: [0 < 10] incoming: [1 < 10])][YES(total shard limits are disabled: [index: -1, cluster: -1] <= 0)][YES(node meets all awareness attribute requirements)][YES(index has a preference for tiers [data_warm,data_hot] and node has tier [data_warm])][YES(shard is not a follower and is not under the purview of this decider)][YES(decider only applicable for indices backed by searchable snapshots)][YES(this decider only applies to indices backed by searchable snapshots)][YES(decider only applicable for indices backed by searchable snapshots)][YES(this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node)]"
                }
            ],
            "type":"illegal_argument_exception",
            "reason":"[move_allocation] can't move 0, from {1667208150001223332}{jQ6N4UQGT1qh5W4Yb1HWRw}{F5DnVEDwSuO3e33wRS8Hgw}{192.168.1.1}{192.168.1.1:9300}{ilrstw}{ml.machine_memory=16512847872, rack=cvm_4_200005, xpack.installed=true, set=200005, transform.node=true, ip=172.16.0.1, ml.max_open_jobs=512, ml.max_jvm_size=8589934592, region=4}, to {1677232737001267632}{alswNrDsTtu4dUrcZVYzfQ}{UQfi6og7S7qHgui-cWuRjg}{192.168.1.2}{192.168.1.2:9300}{ilrstw}{ml.machine_memory=33398218752, rack=cvm_4_200005, xpack.installed=true, set=200005, transform.node=true, ip=172.16.0.3, ml.max_open_jobs=512, ml.max_jvm_size=17179869184, region=4}, since its not allowed, reason: [YES(shard has no previous failures)][YES(shard is primary and can be allocated)][YES(explicitly ignoring any disabling of allocation due to manual allocation commands via the reroute API)][YES(can relocate primary shard from a node with version [7.14.2] to a node with equal-or-newer version [7.14.2])][YES(no snapshots are currently running)][YES(ignored as shard is not being recovered from a snapshot)][YES(this node is not currently shutting down)][NO(node does not match index setting [index.routing.allocation.require] filters [_id:\"jQ6N4UQGT1qh5W4Yb1HWRw\"])][YES(this node does not hold a copy of this shard)][YES(enough disk for shard on node, free: [3.2tb], shard size: [889.9mb], free after allocating shard: [3.2tb])][YES(below shard recovery limit of outgoing: [0 < 10] incoming: [1 < 10])][YES(total shard limits are disabled: [index: -1, cluster: -1] <= 0)][YES(node meets all awareness attribute requirements)][YES(index has a preference for tiers [data_warm,data_hot] and node has tier [data_warm])][YES(shard is not a follower and is not under the purview of this decider)][YES(decider only applicable for indices backed by searchable snapshots)][YES(this decider only applies to indices backed by searchable snapshots)][YES(decider only applicable for indices backed by searchable snapshots)][YES(this node's data roles are not exactly [data_frozen] so it is not a dedicated frozen node)]"
        },
        "status":400
    }
}

{
    "status":400,
    "body":{
        "error":{
            "root_cause":[
                {
                    "type":"illegal_argument_exception",
                    "reason":"[move_allocation] can't move 9, from {1661148951006256332}{4lgZrVBkRWuJmHjog49eLA}{g4Ia-QRxScSPQdSYM8Gksw}{192.168.2.2}{192.168.2.2:9300}{cdhilrstw}{ml.machine_memory=33388974080, rack=cvm_1_100004, xpack.installed=true, set=100004, transform.node=true, ip=172.16.0.2, temperature=warm, ml.max_open_jobs=20, region=1}, to {1661148951006256232}{9jw0c4NTTXaAaBMs0qfp0A}{ZDNzuYqbS-2Qx91bcRx5nw}{192.168.2.3}{192.168.2.3:9300}{cdhilrstw}{ml.machine_memory=33388974080, rack=cvm_1_100004, xpack.installed=true, set=100004, transform.node=true, ip=172.16.0.4, temperature=warm, ml.max_open_jobs=20, region=1}, since its not allowed, reason: [YES(shard has no previous failures)][YES(shard is primary and can be allocated)][YES(explicitly ignoring any disabling of allocation due to manual allocation commands via the reroute API)][YES(can relocate primary shard from a node with version [7.10.1] to a node with equal-or-newer version [7.10.1])][YES(no snapshots are currently running)][YES(ignored as shard is not being recovered from a snapshot)][NO(node does not match index setting [index.routing.allocation.require] filters [temperature:\"warm\",_id:\"7RWrD5QdRxWB1wlCP3jr_Q\"])][YES(this node does not hold a copy of this shard)][YES(enough disk for shard on node, free: [3.5tb], shard size: [16.5mb], free after allocating shard: [3.5tb])][YES(below shard recovery limit of outgoing: [0 < 10] incoming: [0 < 10])][YES(total shard limits are disabled: [index: -1, cluster: -1] <= 0)][YES(node meets all awareness attribute requirements)][YES(node passes include/exclude/require/prefer tier filters)][YES(shard is not a follower and is not under the purview of this decider)][YES(decider only applicable for indices backed by searchable snapshots)]"
                }
            ],
            "type":"illegal_argument_exception",
            "reason":"[move_allocation] can't move 9, from {1661148951006256332}{4lgZrVBkRWuJmHjog49eLA}{g4Ia-QRxScSPQdSYM8Gksw}{192.168.2.2}{192.168.2.2:9300}{cdhilrstw}{ml.machine_memory=33388974080, rack=cvm_1_100004, xpack.installed=true, set=100004, transform.node=true, ip=172.16.0.2, temperature=warm, ml.max_open_jobs=20, region=1}, to {1661148951006256232}{9jw0c4NTTXaAaBMs0qfp0A}{ZDNzuYqbS-2Qx91bcRx5nw}{192.168.2.3}{192.168.2.3:9300}{cdhilrstw}{ml.machine_memory=33388974080, rack=cvm_1_100004, xpack.installed=true, set=100004, transform.node=true, ip=172.16.0.4, temperature=warm, ml.max_open_jobs=20, region=1}, since its not allowed, reason: [YES(shard has no previous failures)][YES(shard is primary and can be allocated)][YES(explicitly ignoring any disabling of allocation due to manual allocation commands via the reroute API)][YES(can relocate primary shard from a node with version [7.10.1] to a node with equal-or-newer version [7.10.1])][YES(no snapshots are currently running)][YES(ignored as shard is not being recovered from a snapshot)][NO(node does not match index setting [index.routing.allocation.require] filters [temperature:\"warm\",_id:\"7RWrD5QdRxWB1wlCP3jr_Q\"])][YES(this node does not hold a copy of this shard)][YES(enough disk for shard on node, free: [3.5tb], shard size: [16.5mb], free after allocating shard: [3.5tb])][YES(below shard recovery limit of outgoing: [0 < 10] incoming: [0 < 10])][YES(total shard limits are disabled: [index: -1, cluster: -1] <= 0)][YES(node meets all awareness attribute requirements)][YES(node passes include/exclude/require/prefer tier filters)][YES(shard is not a follower and is not under the purview of this decider)][YES(decider only applicable for indices backed by searchable snapshots)]"
        },
        "status":400
    }
}

看到这种东西是不是很害怕,一下子就懵了,密密麻麻什么东西,到底哪一条是有效信息,其实从某种角度来讲哈,给的信息越多该问题就越简单(玩笑而已切勿当真)

二、废话不多说,上才艺
  • 将该返回信息格式化一下 json.cn 就会有意外收获
场景一
场景一
场景二
场景二
三、是不是很惊喜,这个NO很突出哦
  • 仔细一看,原来是该索引有个属性,将它分配给了某个节点,使其无法在节点之间移动
代码语言:txt
复制
"index.routing.allocation.require._id": "jQ6N4UQGT1qh5W4Yb1HWRw"
  • 好吧,那就将这个属性置为null吧
代码语言:txt
复制
PUT xxxxxx/_settings
{
    "index.routing.allocation.require._id": null
}

可举一反三,同样适用于index.routing.allocation.require.xxxxxx其他配置

四、文章标题提到的move是什么
  • move
代码语言:txt
复制
POST /_cluster/reroute
{
  "commands": [
    {
      "move": {
        "index": "test", "shard": 0,
        "from_node": "node1", "to_node": "node2"
      }
    }
  ]
}
  • 友情赠送retry
代码语言:txt
复制
GET _cluster/allocation/explain
POST _cluster/reroute?retry_failed=true

reroute API要会用哈

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cluster-reroute.html

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 一、先看两个报错
  • 看到这种东西是不是很害怕,一下子就懵了,密密麻麻什么东西,到底哪一条是有效信息,其实从某种角度来讲哈,给的信息越多该问题就越简单(玩笑而已切勿当真)
    • 二、废话不多说,上才艺
      • 三、是不是很惊喜,这个NO很突出哦
        • 四、文章标题提到的move是什么
        相关产品与服务
        Elasticsearch Service
        腾讯云 Elasticsearch Service(ES)是云端全托管海量数据检索分析服务,拥有高性能自研内核,集成X-Pack。ES 支持通过自治索引、存算分离、集群巡检等特性轻松管理集群,也支持免运维、自动弹性、按需使用的 Serverless 模式。使用 ES 您可以高效构建信息检索、日志分析、运维监控等服务,它独特的向量检索还可助您构建基于语义、图像的AI深度应用。
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
        http://www.vxiaotou.com