# Не происходит распределение шард по нодам

**URL:** <https://discuss.elastic.co/t/topic/128747>\
**Category:** Вопросы на русском языке\
**Created:** [April 19, 2018, 4:32pm UTC](https://discuss.elastic.co/t/topic/128747 "2018-04-19T16:32:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IvanTushin](https://avatars.discourse-cdn.com/v4/letter/i/dbc845/32.png) [@IvanTushin](https://discuss.elastic.co/u/IvanTushin)\
**Post date:** [April 19, 2018, 4:32pm UTC](https://discuss.elastic.co/t/topic/128747/1 "2018-04-19T16:32:22Z")

</div>

Здравствуйте! Помогите пожалуйста, после сбоя не происходит распределения/восстановления шард. Статус кластера застрял на желтом, вижу что шарды не восстанавливаются.

```
yellow open tenders_index_2017 XUu1wCCYRfeFOqCenTfx3w 6 1 45490898 20858517 911.7gb 911.7gb
yellow open tenders_index_2018 VTeZfZsKRL-wUlm-eVZdkQ 6 1 13819362 8781152 269.4gb 269.4gb
yellow open contracts_index_all 7tJyMl_sQsGMMweXdEZxWQ 6 1 112056107 1524990 35.6gb 35.6gb
green open tenders_index_2016 A52oUWlVROOaO0GXTmSMCg 6 0 28746938 375544 137.7gb 137.7gb

```

Параметр выставлен:  
`{ "persistent": { "cluster.routing.allocation.enable": "all" } }`

Можно как-нибудь принудительно запустить данный процесс и посмотреть что мешает перераспределению?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [April 19, 2018, 4:41pm UTC](https://discuss.elastic.co/t/topic/128747/2 "2018-04-19T16:41:08Z")

</div>

Hi,

Use this [https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) to first understand where and why shards may be unassigned.

Then, [https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#\_retry\_failed\_shards](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#_retry_failed_shards) to retry shard allocation.

The elasticsearch.log will be helpful in understanding why shards are not being assigned.

//translator//  
Здравствуй,

Используйте этот [https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html), чтобы сначала понять, где и почему осколки могут быть неназначенными.

Затем, [https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#\_retry\_failed\_shards](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#_retry_failed_shards), чтобы повторить попытку выделения осколков.

Elasticsearch.log будет полезен в понимании того, почему осколки не назначаются.  
Zdravstvuy,

---

<div class="post-metadata">

**Author:** ![IvanTushin](https://avatars.discourse-cdn.com/v4/letter/i/dbc845/32.png) [@IvanTushin](https://discuss.elastic.co/u/IvanTushin)\
**Post date:** [April 19, 2018, 4:53pm UTC](https://discuss.elastic.co/t/topic/128747/3 "2018-04-19T16:53:49Z")

</div>

Спасибо за быстрый ответ!  
{  
"index": "tenders\_index\_2018",  
"shard": 4,  
"primary": false,  
"current\_state": "unassigned",  
"unassigned\_info": {  
"reason": "CLUSTER\_RECOVERED",  
"at": "2018-04-19T15:28:47.389Z",  
"last\_allocation\_status": "no\_attempt"  
},  
"can\_allocate": "no",  
"allocate\_explanation": "cannot allocate because allocation is not permitted to any of the nodes",  
"node\_allocation\_decisions": [  
{  
"node\_id": "-7AEfximRNieGIMlvIH19A",  
"node\_name": "WIN-1",  
"transport\_address": "192.168.0.1:9300",  
"node\_decision": "no",  
"deciders": [  
{  
"decider": "disk\_threshold",  
"decision": "NO",  
"explanation": "the node is above the low watermark cluster setting [cluster.routing.allocation.disk.watermark.low=85%], using more disk space than the maximum allowed [85.0%], actual free: [14.961986682375898%]"  
}  
]  
},  
{  
"node\_id": "TpMv7UjiRjSgME0lzeBZqQ",  
"node\_name": "WIN-2",  
"transport\_address": "192.168.0.2:9300",  
"node\_decision": "no",  
"deciders": [  
{  
"decider": "same\_shard",  
"decision": "NO",  
"explanation": "the shard cannot be allocated to the same node on which a copy of the shard already exists [[tenders\_index\_2018][4], node[TpMv7UjiRjSgME0lzeBZqQ], [P], s[STARTED], a[id=D8JkULEyTbSD-K1LQonCyw]]"  
},  
{  
"decider": "disk\_threshold",  
"decision": "NO",  
"explanation": "the node is above the low watermark cluster setting [cluster.routing.allocation.disk.watermark.low=85%], using more disk space than the maximum allowed [85.0%], actual free: [13.234659821408892%]"  
}  
]  
}  
]  
}

Получается что шарды не реплицируются по причине недостаточного места?  
Могу ли я отключить реплику и заново установить значение в 1, тогда произойдет перемещение?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [April 19, 2018, 5:10pm UTC](https://discuss.elastic.co/t/topic/128747/4 "2018-04-19T17:10:50Z")

</div>

low watermark! [https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html)

You need to delete older data or add more disk space. You have \<15% disk space remaining thus no replica allocation.  
//  
низкий водяной знак! [https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html)

Вам нужно удалить старые данные или добавить больше места на диске. У вас осталось менее 20% дискового пространства, поэтому нет распределения реплик.

---

<div class="post-metadata">

**Author:** ![IvanTushin](https://avatars.discourse-cdn.com/v4/letter/i/dbc845/32.png) [@IvanTushin](https://discuss.elastic.co/u/IvanTushin)\
**Post date:** [April 19, 2018, 5:30pm UTC](https://discuss.elastic.co/t/topic/128747/5 "2018-04-19T17:30:32Z")

</div>

Спасибо за помощь! Вы очень помогли!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2018, 5:30pm UTC](https://discuss.elastic.co/t/topic/128747/6 "2018-05-17T17:30:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
