Hello
I'm stuck at the moment, maybe someone can help me.
I am reading through the instructions step by step and am trying to recreate this on my Windows system.
https://www.elastic.co/guide/en/elastic-stack/8.14/installing-stack-demo-self.html#install-stack-self-elasticsearch-second
The first node worked without any problems.
The instructions say (8.)
To enable this second Elasticsearch node to connect to the first, you need to configure an enrollment token.
Be sure to run all of these configuration steps before starting the Elasticsearch service.
You can find additional details about these steps in Reconfigure a node to join an existing cluster and also in Enroll nodes in an existing cluster.
Return to your terminal shell on the first Elasticsearch node and generate a node enrollment token:
sudo /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node
I created the token on the first node
C:\mon\e\bin>elasticsearch-create-enrollment-token -s node
eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTcyLjIwLjI0OS41Mzo5MjAwIl0sImZnciI6IjJlYzA4YjIzNDBiNDM3MzNkNTA1NjQwOWRjNWU4NmM3OTZkYmFhN2YxYmJhM2MwMjUwOTFhNWE4YWM3NTA1ZTkiLCJrZXkiOiJMVGNFRkpFQkN6TGVhZXlKajYxejpHeU00UHNKb1NObUNYRk54ZUpmYUFBIn0=
Now the problem:
On the second (new) node I get the error message that the security settings have not yet been made
C:\mon\e\bin>elasticsearch-reconfigure-node --enrollment-token eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTcyLjIwLjI0OS41Mzo5MjAwIl0sImZnciI6IjJlYzA4YjIzNDBiNDM3MzNkNTA1NjQwOWRjNWU4NmM3OTZkYmFhN2YxYmJhM2MwMjUwOTFhNWE4YWM3NTA1ZTkiLCJrZXkiOiJMVGNFRkpFQkN6TGVhZXlKajYxejpHeU00UHNKb1NObUNYRk54ZUpmYUFBIn0=
Generates all the necessary security configuration for a node in a secured cluster
Option Description
------ -----------
-E <KeyValuePair> Configure a setting
--enrollment-token The enrollment token to use
-h, --help Show help
-s, --silent Show minimal output
-v, --verbose Show verbose output
ERROR: Aborting enrolling to cluster. This node doesn't appear to be auto-configured for security. Expected configuration is missing from elasticsearch.yml., with exit code 64
This is correct because the elasticsearch.yml is still in its original state
The problem: If I follow the instructions and execute step 6 first:
6. Run the Elasticsearch install command:
*sudo rpm --install elasticsearch-8.14.3-x86_64.rpm*
Unlike the setup for the first Elasticsearch node, in this case you don’t need to copy the output of the install command, since these settings will be updated in a later step.
If I then start the reconfigure process, I get this message:
C:\mon\e\bin>elasticsearch-reconfigure-node --enrollment-token eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTcyLjIwLjI0OS41Mzo5MjAwIl0sImZnciI6IjJlYzA4YjIzNDBiNDM3MzNkNTA1NjQwOWRjNWU4NmM3OTZkYmFhN2YxYmJhM2MwMjUwOTFhNWE4YWM3NTA1ZTkiLCJrZXkiOiJMVGNFRkpFQkN6TGVhZXlKajYxejpHeU00UHNKb1NObUNYRk54ZUpmYUFBIn0=
ERROR: Skipping security auto configuration because it appears that the node is not starting up for the first time. The node might already be part of a cluster and this auto setup utility is designed to configure Security for new clusters only., with exit code 80
So are the instructions wrong, have I made a mistake somewhere or does it work completely differently with Windows?