Could not communicate with the node on any of the addresses from the enrollment token

Hey everyone,

actually doing my very first steps with elastic and want to use it with the full ELK Stack. I decided for a testing cluster of 3 elastic nodes and one kibana nodes.

The node-1 is running fine with this elasticsearch.yaml changes:

cluster.name: elk-cluster
node.name: elk1
path.data: /mnt/elk1-data
bootstrap.memory_lock: true
network.host: 10.1.201.7
transport.host: 0.0.0.0

The other nodes running with something like:

cluster.name: elk-cluster
node.name: elk2
path.data: /mnt/elk2-data
network.host: 10.1.201.8
bootstrap.memory_lock: true

Surely i've set the limits.conf to unlimited for elasticsearch memlock, changed LimitMEMLOCK to infinity in the systemd file. The JVM options are set to 50% of cpu. I've reloaded the systemd daemon after the changes on systemd.

I've generated a enrollment token on node-1 and posted it to node-2 as following command:

/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <TOKEN>

The error message shows:

Unable to communicate with the node on https://10.1.201.7:9200/_security/enroll/node. Error was null
ERROR: Aborting enrolling to cluster. Could not communicate with the node on any of the addresses from the enrollment token. All of [10.1.201.7:9200] were attempted., with exit code 69

When checking the cluster log of 10.1.201.7 i cant find anything interesting else this:

[2024-11-02T00:48:29,189][WARN ][o.e.c.c.ClusterBootstrapService] [elk1] this node is locked into cluster UUID [DsT9lOc6RMml4uPZ5LWgvg] but [cluster.initial_master_nodes] is set to [elk1]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see https://www.elastic.co/guide/en/elasticsearch/reference/8.15/important-settings.html#initial_master_nodes

When doing a curl from node-2 to node-1 it works fine:

curl -k -u elastic:<REDUCTED> 'https://10.1.201.7:9200/_cluster/health?pretty'

Any idea what i'm doing wrong? Would like every hint.

//Edit
I dont know if its important...I tried multiple times multilple ways. But everytime i purged elasticsearch (apt purge elasticsearch) and took sure that the directorys (data dir, conf dir) are deleted.

Best regards