Correct configuration Elastic Search 8.10.4

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 !!

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

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.

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.

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:?]

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.

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?

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.

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!

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.

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.

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.

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 ?

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 !!!

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