# How to add back a node after excluding it from cluster

**URL:** <https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097>\
**Category:** Elasticsearch\
**Created:** [June 20, 2017, 12:56pm UTC](https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097 "2017-06-20T12:56:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lekhasy](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@lekhasy](https://discuss.elastic.co/u/lekhasy)\
**Post date:** [June 20, 2017, 12:56pm UTC](https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097/1 "2017-06-20T12:56:07Z")

</div>

I have used this command to exclude one of my node from my cluster:  
`PUT _cluster/settings { "transient": {"cluster": {"routing": {"allocation.exclude": {"_name": "node_2"}}}} }`

it works as expected, but when i use this command to add it back to the cluster, nothing happen:  
`PUT _cluster/settings { "transient": {"cluster": {"routing": {"allocation.include":{"_name": "node_2"}}}} }`

Here is the response:  
`{ "acknowledged": true, "persistent": {}, "transient": { "cluster": { "routing": { "allocation": { "include": { "_name": "node_2" } } } } } }`

I have checked the cluster health, node status, index status  
it all show that node\_2 still be excluded.  
Please someone show me what i'm missing?  
Thank you.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [June 20, 2017, 2:23pm UTC](https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097/2 "2017-06-20T14:23:08Z")

</div>

You need to do this:

```auto
PUT _cluster/settings
{
"transient": {"cluster": {"routing": {"allocation.exclude": {"_name": ""}}}}
}

```

---

<div class="post-metadata">

**Author:** ![lekhasy](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@lekhasy](https://discuss.elastic.co/u/lekhasy)\
**Post date:** [June 25, 2017, 7:07am UTC](https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097/3 "2017-06-25T07:07:36Z")

</div>

I have tried yours, but the problem is remain.  
There are no shards allocated in node\_2.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e7cfc3673f9c4c20d9dd9c319a0097afbc96967f.png)  
And i still wonder why node\_1 just get 3 shards?  
Why it isn't allocated 13 shards as master node?

i have not created any index in the cluster:  
`yellow open .monitoring-kibana-2-2017.06.25 pkBxMbYgQnayRCB-XdbQ3A 1 1 92 0 60.3kb 60.3kb yellow open .monitoring-es-2-2017.06.19 mqwa0REiTAqfgDFIUzfebQ 1 1 16068 66 8.3mb 8.3mb green open .triggered_watches 08Nz7-xnRr2elqI5f3zsEQ 1 1 16 0 11.5kb 5.7kb yellow open .monitoring-es-2-2017.06.18 WUKq6IsvQ6KA8nYsPW-0MQ 1 1 528 128 734.8kb 734.8kb yellow open .monitoring-alerts-2 1IHil0cWTFCpwy7AAS1f0A 1 1 1 0 13kb 13kb yellow open .monitoring-es-2-2017.06.25 ZUPSHhcJTwWR1AwNL0gLzw 1 1 3132 28 3.5mb 3.5mb yellow open .monitoring-kibana-2-2017.06.19 TZYUwod1TYu-FLP_yfedIg 1 1 788 0 246.5kb 246.5kb yellow open .monitoring-kibana-2-2017.06.18 xD7oxXgKRzGSNB3SnpBacw 1 1 72 0 132kb 132kb yellow open .watcher-history-3-2017.06.19 cusiT0rfSYi90KX_jYxyCQ 1 1 529 0 541.1kb 541.1kb yellow open .kibana X_bQIOejQT6OaZPtp6D3Qg 1 1 1 0 3.8kb 3.8kb yellow open .watches WXAzxF_ETey-ygSQrVNOlA 1 1 4 0 46.6kb 46.6kb green open .watcher-history-3-2017.06.25 PAzIBgLLRFi1lgS6LyBrSQ 1 1 92 0 301.7kb 124.3kb yellow open .monitoring-data-2 SAnxNWXjT4uIErqaIuXL2w 1 1 6 2 22.9kb 22.9kb yellow open .watcher-history-3-2017.06.18 mMUB5LpVTl-H8kio42PdGw 1 1 28 0 68kb 68kb`

---

<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:** [July 23, 2017, 7:07am UTC](https://discuss.elastic.co/t/how-to-add-back-a-node-after-excluding-it-from-cluster/90097/4 "2017-07-23T07:07:52Z")

</div>

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