# Correct configuration Elastic Search 8.10.4

**URL:** <https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238>\
**Category:** Elasticsearch\
**Created:** [October 17, 2023, 5:54pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238 "2023-10-17T17:54:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 17, 2023, 5:54pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/1 "2023-10-17T17:54:26Z")

</div>

I'm starting a new Elastic installation  
search and Kibana, version 8.10.4..

My goal is to make a better distribution following some recommendations I saw, for example 3 master, 2 data hot, 2 warm in different zones..

So I installed Elasticsearch 8.10.4 on a server, and I would initially leave it with the role node.roles: [master] , but it wouldn't accept it (because it said it had data), it asked to run elasticsearch.node -repurpose, I ran it, then it wouldn't log in to elastic or kibana anymore (it seems like it deleted the credentials, and wouldn't let it be reset), but this is just to know what was done...

I would like to know what would be the correct sequence to create this scenario? Do I initially need to have other servers available with other functions? Anyway, what needs to be done and what is the correct sequence?

Thank you very much !!

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 17, 2023, 6:13pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/2 "2023-10-17T18:13:25Z")

</div>

> [@Fernando\_Oliveira](#):
>
> So I installed Elasticsearch 8.10.4 on a server, and I would initially leave it with the role node.roles: [master] , but it wouldn't accept it (because it said it had data), it asked to run elasticsearch.node -repurpose, I ran it, then it wouldn't log in to elastic or kibana anymore (it seems like it deleted the credentials, and wouldn't let it be reset), but this is just to know what was done...

Can you share the logs for this? Also, share the `elasticsearch.yml` for all your nodes.

> [@Fernando\_Oliveira](#):
>
> Do I initially need to have other servers available with other functions?

For a cluster to work it needs to have at least a node with a `master` role and node with a `data` role, or `data_hot` and `data_content` role, if you plan to use ingest pipelines in Elasticsearch you will also need nodes to have an `ingest` pipeline.

The explanation about the roles can be found [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#node-roles).

For example, if you want to start a cluster with the configuration you mentioned.

- 3 master only
- 2 data hot
- 2 data warm

In this configuration your master nodes will have the `master` role, the data hot will have `data_hot`, `data_content` and `ingest` roles and the data warm will have the `data_warm` roles.

---

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 17, 2023, 6:57pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/3 "2023-10-17T18:57:46Z")

</div>

Many thanks for the reply.

The configuration would be this, but with nodes.role: [master] enabled, elastic does not go up (it will give the error below stating that you need to run the elasticsearch-node repurpose' tool to clean up  
, is it possible that for it to go up I need to go up the other server that you mentioned with data\_hot and data\_content ?

Is this the correct sequence?

[2023-10-17T18:51:52,598][INFO][o.e.e.NodeEnvironment] [node-1] using [1] data paths, mounts [[/ (/dev/root)]], net usable\_space [4gb], net total\_space [7.5gb], types [ext4]  
[2023-10-17T18:51:52,599][INFO][o.e.e.NodeEnvironment] [node-1] heap size [2.2gb], compressed ordinary object pointers [true]  
[2023-10-17T18:51:52,631][ERROR][o.e.b.Elasticsearch] [node-1] fatal exception while booting Elasticsearch  
java.lang.IllegalStateException: node does not have the data role but has shard data: [/var/lib/elasticsearch/indices/bjz7sVFuR3-R6U0JgoqjIg/0, /var/lib/elasticsearch/indices/Xdw\_TixSQRCFMWGmpENk6A/0, /var/lib/elasticsearch/indices/\_nT8vgC8TZKqXawNrzZrVA/0, /var/lib/elasticsearch/indices/29EgV4prSOmW5LPh6lHI3A/0, /var/lib/elasticsearch/indices/PZlNIolcS\_qllEmi2y7V\_g/0, /var/lib/elasticsearch/indices/D4lbInSNRKCLr\_6O0bbv5A/0, /var/lib/elasticsearch/indices/YcweCcTOROeZUjgBu3Uycw/0, /var/lib/elasticsearch/indices/yIWX8QnZSlKDBQAdi\_L1Mw/0, /var/lib/elasticsearch/indices/JmRyEDALTbOysNHZ4zkkgA/0, /var/lib/elasticsearch/indices/vYiq-rmxRm2netPMSVy9fw/0, /var/lib/elasticsearch/indices/-Mm0r1L6QBWAaGYQlDZiIw/0, /var/lib/elasticsearch/indices/zdwVEnPkQaS9HLq4A6Hdzg/0, /var/lib/elasticsearch/indices/VfZLDRByT2iEeeeVfjMQYw/0, /var/lib/elasticsearch/indices/V1tp\_FYxTc2JnRN5tcMeAw/0, /var/lib/elasticsearch/indices/2y\_9CfgoQc6YV0pL5AAFaQ/0, /var/lib/elasticsearch/indices/Kr9QWy5pTCuKtaTB\_vCkPg/0, /var/lib/elasticsearch/indices/PlMG9UZvREi8Myecu\_3wIg/0, /var/lib/elasticsearch/indices/lG0UEnHnQ4WipU46hmec-Q/0, /var/lib/elasticsearch/indices/h3Ywu5fAQEajic57UEQ8mA/0, /var/lib/elasticsearch/indices/-TUQqfkcRemXCE3TfsDTNg/0, /var/lib/elasticsearch/indices/\_SK5Rh0qSmGFEHHt7uc-jA/0, /var/lib/elasticsearch/indices/wOmmeVK9TjiDMBQwFHOKHA/0, /var/lib/elasticsearch/indices/bozIYKwGTxuobjdvmiPpfQ/0, /var/lib/elasticsearch/indices/T2thbqwjQUC9M4lMzLkn1w/0, /var/lib/elasticsearch/indices/i1F3viH\_QnSRp7BSWGGFYQ/0, /var/lib/elasticsearch/indices/wEkQMdJLRRSvKf\_mRaMFVA/0, /var/lib/elasticsearch/indices/5ZX2rX49TA-BeAXpjGdroA/0, /var/lib/elasticsearch/indices/fpOoDWxZRBOrevyFMHXMjg/0, /var/lib/elasticsearch/indices/zUrwMTDYQNyDv1BpMW0tWA/0]. Use 'elasticsearch-node repurpose' tool to clean up  
at org.elasticsearch.env.NodeEnvironment.ensureNoShardData(NodeEnvironment.java:1339) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:330) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.node.Node.(Node.java:490) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.node.Node.(Node.java:338) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:234) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:234) ~[elasticsearch-8.10.4.jar:?]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:72) ~[elasticsearch-8.10.4.jar:?]

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e82151470b3ce34b687addd8fc6c82c732594615.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 17, 2023, 7:02pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/4 "2023-10-17T19:02:13Z")

</div>

Do you have other nodes in your cluster?

You **need** to have data nodes.

Also, this message means that this node was a data node before.

---

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 17, 2023, 7:15pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/5 "2023-10-17T19:15:14Z")

</div>

Do you have other nodes in your cluster?  
No, this is the first machine...

You need to have data nodes.  
Ok, I'll install another server with role data

Also, this message means that this node was a data node before.  
This is a standard installation server, I believe it comes with all roles enabled, right?

And to install this other server with role-data..  
I install the server with elastic, configure it with the data\_hot role, and do I need to generate that token to allow this new server to join the cluster?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 17, 2023, 8:12pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/6 "2023-10-17T20:12:08Z")

</div>

> [@Fernando\_Oliveira](#):
>
> This is a standard installation server, I believe it comes with all roles enabled, right?

Per default, it will start with all roles enabled, if you started this node before, than you cannot change it to master only untinl you have a working cluster with more nodes.

---

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 18, 2023, 12:30pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/7 "2023-10-18T12:30:37Z")

</div>

Hello, thank you very much for your help!

So what would be the correct implementation sequence?

First, do I install 2 servers and leave both with the master role in the same cluster?

Second, do I install at least 1 server with the data\_hot role?

Feel free to correct, if you can detail the sequence I would greatly appreciate it!

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 18, 2023, 12:34pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/8 "2023-10-18T12:34:25Z")

</div>

> [@Fernando\_Oliveira](#):
>
> First, do I install 2 servers and leave both with the master role in the same cluster?

You need at least 3 master nodes to have a resilient cluster, with 2 master nodes if you lose the active master node the entire cluster will go down.

But your current node cannot be changed to master as it was already a data node, unless you can remove the data folder and start again.

> [@Fernando\_Oliveira](#):
>
> Second, do I install at least 1 server with the data\_hot role?

You need to configure all your cluster, master and data, and after that you start your nodes at the same time, you can't start only the masters without a data node running.

> [@Fernando\_Oliveira](#):
>
> So what would be the correct implementation sequence?

First configure all your nodes, the 3 master nodes and at least one data node with the roles of `data_hot` and `data_content`.

After you configured everything, you can start the master nodes and the data node, after some time the cluster will be formed.

When the cluster is formed you may start adding new data nodes to it.

---

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 18, 2023, 1:00pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/9 "2023-10-18T13:00:47Z")

</div>

When you say start the 3 master nodes, would it be leaving the 3 with the role masters and starting the elastic service on all of them?

And for the data node, leave at least 1 with the data\_hot and data\_content roles and start the elastic service?

Or do you need to execute a command other than start ?

---

<div class="post-metadata">

**Author:** ![Fernando\_Oliveira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernando_oliveira/32/80628_2.png) [@Fernando\_Oliveira](https://discuss.elastic.co/u/Fernando_Oliveira)\
**Post date:** [October 23, 2023, 1:50pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/10 "2023-10-23T13:50:11Z")

</div>

Please..

For this sequence that guided you to climb the 3 master nodes..  
The correct thing is for me to do 3 individual installations of elastic (it generates that super user login...), and I individually configure the elasticsearch.yml containing the name of the cluster (same name in all), the role masters, the name of each node, ip, port and I also configure the 2 servers with the roles data, cluster name, ip, port, and only after configuring all these items do I start the elastic serach service first on the 3 masters and then on the 2 nodes? And I hope to create the cluster, is that it?

Thank you very much !!!

---

<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:** [November 20, 2023, 1:51pm UTC](https://discuss.elastic.co/t/correct-configuration-elastic-search-8-10-4/345238/11 "2023-11-20T13:51:01Z")

</div>

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