# Unable to remove Root Node

**URL:** <https://discuss.elastic.co/t/unable-to-remove-root-node/290978>\
**Category:** Elasticsearch\
**Created:** [December 5, 2021, 9:44am UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978 "2021-12-05T09:44:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![salim-buet03](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/salim-buet03/32/98270_2.png) [@salim-buet03](https://discuss.elastic.co/u/salim-buet03)\
**Post date:** [December 5, 2021, 9:44am UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978/1 "2021-12-05T09:44:46Z")

</div>

I have 2 nodes cluster, both are mastered enabled.  
node-1

```auto
cluster.name: test
node.name: "node-1"
node.master: true
node.data: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
http.port: 8200
network.host: ["localhost","ip1"]
transport.tcp.port: 8300
discovery.zen.ping.unicast.hosts: ["ip1","ip2"]
discovery.zen.minimum_master_nodes: 1
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

```

node-1

```auto
cluster.name: test
node.name: "node-2"
node.master: true
node.data: true
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
http.port: 8200
network.host: ["localhost","ip2"]
transport.tcp.port: 8300
discovery.zen.ping.unicast.hosts: ["ip1","ip2"]
discovery.zen.minimum_master_nodes: 1
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

```

Everything is working fine and perfectly.  
Note : I have created .p12 certificate and pass in node-1 (bin/Elasticsearch-setup-passwords interactive). and shards are available on both nodes

Now I want to remove node-1. So If I stop node 1, node-2 has the following errors.  
master\_not\_discovered\_exception  
or  
cluster\_block\_exception  
or  
unable to authenticate issue.

Can anyone pls help? How Can I remove node-1 safely?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 5, 2021, 9:58am UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978/2 "2021-12-05T09:58:40Z")

</div>

As described [in the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/high-availability-cluster-small-clusters.html) you need at least 3 masdter eligible nodes in order to create a highly available cluster that can continue operating even if one of the nodes is lost. With only 2 master eligible nodes in the cluster the loss of one node will prevent a master from being elected and cause the remaining node to no longer accept writes.

If you want to permanently remove one node and keep the remaining one as a single node cluster I suspect you may need to use [the elasticsearch-node tool](https://www.elastic.co/guide/en/elasticsearch/reference/current/node-tool.html), but I will not be able to guide on this as I have not used this myself.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 5, 2021, 2:00pm UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978/3 "2021-12-05T14:00:15Z")

</div>

That's not the case. The `elasticsearch-node` tool is very dangerous and should always be avoided. The manual describes [how to remove master-eligible nodes](https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html#modules-discovery-removing-nodes) and covers the case when you want to remove half or more of them.

---

<div class="post-metadata">

**Author:** ![salim-buet03](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/salim-buet03/32/98270_2.png) [@salim-buet03](https://discuss.elastic.co/u/salim-buet03)\
**Post date:** [December 6, 2021, 1:49am UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978/4 "2021-12-06T01:49:14Z")

</div>

Thanks for your kind reply.  
I tried with 5 nodes before, where 4 are mastered. Still, If I remove the root node (where I created pass&cert), other nodes have the same issue...  
master\_not\_discovered\_exception  
or  
cluster\_block\_exception  
or  
unable to authenticate issue.

---

<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:** [January 3, 2022, 1:49am UTC](https://discuss.elastic.co/t/unable-to-remove-root-node/290978/5 "2022-01-03T01:49:48Z")

</div>

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