弹性搜索 - 如何处理未分配的碎片 [英] elasticsearch - what to do with unassigned shards

查看:290
本文介绍了弹性搜索 - 如何处理未分配的碎片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的群集具有黄色状态,因为某些分片未分配。这个怎么办?



我尝试将所有索引的 cluster.routing.allocation.disable_allocation = false 但是我认为这不行,因为我使用的是1.1.1版本。



我也尝试重新启动所有机器,但同样会发生。
$ b

任何想法?



编辑:




  • 群集状态:

      {
    cluster_name:elasticsearch,
    状态:red,
    timed_out:false,
    number_of_nodes:5,
    number_of_data_nodes:4,
    active_primary_shards:4689,
    active_shards:4689,
    relocating_shards:0,
    initializing_shards:10,
    unassigned_shards:758
    }



解决方案

那些未分配的碎片实际上是从主节点上的实际碎片未分配的副本。



为了分配这些分片,您需要运行一个新的el实例创建辅助节点以携带数据副本。



编辑:有时未分配的分片属于已删除的索引,使其成为孤儿无论何时添加节点,都不会分配碎片。但是情况并非如此!


my cluster is with yellow status because some shards are unassigned. what to do with this?

I tried set cluster.routing.allocation.disable_allocation = false to all indexes, but I think this don't work because I'm using version 1.1.1.

I also tried restarting all machines, but same happens.

Any idea?

EDIT :

  • Cluster stat :

    { 
      cluster_name: "elasticsearch",
      status: "red",
      timed_out: false,
      number_of_nodes: 5,
      number_of_data_nodes: 4,
      active_primary_shards: 4689,
      active_shards: 4689,
      relocating_shards: 0,
      initializing_shards: 10,
      unassigned_shards: 758
    }
    

解决方案

Those unassigned shards are actually unassigned replicas of your actual shards from the master node.

In order to assign these shards, you need to run a new instance of elasticsearch to create a secondary node to carry the data replicas.

EDIT: Sometimes the unassigned shards belongs to indexes that have been deleted making them orphan shards that will never assign regardless of adding nodes or not. But it's not the case here!

这篇关于弹性搜索 - 如何处理未分配的碎片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆