您好,登录后才能下订单哦!
密码登录
            
            
            
            
        登录注册
            
            
            
        点击 登录注册 即表示同意《亿速云用户服务条款》
        elasticsearch 集群indices 分片状态INITIALIZING,集群状态为: yellow
GET /_cat/shards/7a_cool
7a_cool 5  r STARTED      4583018 759.4mb 10.2.4.21 pt01-pte-10-2-4-21
7a_cool 17 r INITIALIZING                 10.2.4.22 pt01-pte-10-2-4-22  《==异常分片
        登陆pt01-pte-10-2-4-22 主机  ,/etc/init.d/elasticsearch  stop ,发现分片自动迁移至其它主机,但是状态还是在初始化状态,问题依旧存在;   
POST /_cluster/reroute
{
  "commands": [
    {
      "move": {
        "index": "7a_cool",
        "shard": 17,
        "from_node": "pt01-pte-10-2-4-22",
        "to_node": "pt01-pte-10-2-4-25"
      }
    }
  ]
}
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "[move_allocation] can't move 17, shard is not started (state = INITIALIZING]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "[move_allocation] can't move 17, shard is not started (state = INITIALIZING]"
  },
  "status": 400
}
    以上信息显示, state = INITIALIZING ,不能移动。   
    首先修改indices 副本数为0 
    此时集群开始调整集群分片,调整完成后集群状态变成:green
PUT 7a_cool/_settings
{
  "index": {
        "number_of_replicas": "0"
        }
}
PUT 7a_cool/_settings
{
  "index": {
        "number_of_replicas": "1"
        }
}
集群会再次调整副本数量,调整完成后集群状态依然是:green ,问题解决。
													免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。