Node Auto Configuration

Hi there, I´m trying to deploy a new cluster using Elasticsearch 8 but it seens that is not working the way I expected.
4 Servers:
3 Elasticsearch
1 kibana

All in the same network.
I´m following the steps using the Elasticsearch website to add new nodes which is:

bin/elasticsearch-create-enrollment-token -s node

After created the token, I´m trying to add the second node(server) using:

bin/elasticsearch --enrollment-token <enrollment-token>

After that, I´m receiving the following error:

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.

Is there something I need to change to make it work?

Thanks for the attention.

1 Like

Hi there, it looks like you had attempted to start Elasticsearch on the second node before you actually ran the command you’re showing us. Th enrollment process is designed for initial bootstrap and will not attempt to configure nodes that have already started.

Given the command you are using I presume that you are installing via an archive, so just delete the Elasticsearch dir on the second node, unpack the archive and try again !

Hope this helps

That´s the thing, what I´ve done was, installed the Elasticsearch on a new server.

apt install elasticsearch

And that´s it!

I was thinking like to add something to the Elasticsearch.yml but it seens that because you never mentioned, is something else.

Did not even started the Elasticsearch :frowning:

But to make sure, I´ll remove the Elasticsearch from the server, reboot and start again. We never know.

Thanks

Ah apologies ! You’re using the deb package , that’s slightly different :slight_smile:

You need to follow this documentation in your second and third node : Install Elasticsearch with Debian Package | Elasticsearch Guide [8.0] | Elastic

I had similar problem with rpm packages on CentOS.

When installing Elasticsearch through yum, the service is automatically started, so you can't later reconfigure the node.

Instead, I installed the package through rpm --install, so that it doesn't autostart.

I assume similar solution would work for Debian based distros, just download it manually and install with dpkg -i.

I believe the official docs could be more helpful on this.

Thanks for your feedback @szajbus ! Elasticsearch should not start automatically when installed by packages (irrespective to the security configuration) and if we do so it's a bug. I just verified that Elasticsearch doesn't automatically start when you install it with a DEB package via APT, as expected.

I'll take a look at the behavior with YUM and the RPM package and make sure we fix this behavior if needed

1 Like

Hi again @szajbus , I couldn't replicate the behavior you are experiencing. Following our docs in Install Elasticsearch with RPM | Elasticsearch Guide [8.0] | Elastic and installing Elasticsearch with YUM, the service did not automatically start - as expected - and I was able to run the elasticsearch-reconfigure-node CLI tool directly after installation.

Can you please verify that you can replicate the behavior you observed and if so, share with us the actual steps you performed, the OS you are running this in so that we can further investigate ? Thanks

1 Like

That did it work. I´ve used the command bellow on each node:

elasticsearch-reconfigure-node

Really appreciate for your help! :slight_smile:

1 Like

Hi @ikakavas, I think it was in fact a mistake on my side. I used a custom ansible playbook that started the service automatically. I'm sorry for confusion!

1 Like

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