Elasticsearch cluster name in yml file

I have created a 3 node cluster. I have not mentioned cluster name or node name . It's using the default cluster name elasticsearch and node name of the Linux system. Initially I formed the cluster using the enrollment token,it doesn't work now gives me Unable to create token error. Now I want to add a new node manually. I know to make the yml changes same as other nodes. In the yaml added xpack.security.enrollment.enabled: false and
xpack.security.autoconfiguration.enabled: false

I have also not mentioned cluster name and node name here. Will this approach be correct @stephenb

Also even if I make the node name and cluster name change, how and what restart steps I should follow to avoid to break the cluster unmesscary. @stephenb

Hi @King_storm

1st Welcome to the community

2nd directly @ people that are not already party of your topic already is poor forum etiquette.

Doing it multiple times not real good...

Please be patient

There are many questions and only a limited number of people to answer.

With respect to your question there is not enough information to answer...

If you want help please provide the elasticsearch.yml of one of the existing nodes that is working and the same for the new node...

Then perhaps someone can help

Also perhaps look at

1 Like

Hi, Please accept my apologies. It's my first time on a major forum.

Attaching below is my Elasticsearch node yml similar on all 3 nodes on my cluster.

#cluster.name: my-application

#node.name: node-1

node.roles: [ "data","master","remote_cluster_client" ] 

path.data: /es-data/elasticsearch 

path.logs: /opt/logs/elasticsearch 

network.host: 0.0.0.0 

http.port: 9200 

discovery.seed_hosts: ["<node-2>:9300","<node-3>:9300","<new-node>:9300"] 

xpack.security.enabled: true
 xpack.security.enrollment.enabled: true 

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents 

xpack.security.http.ssl: 

enabled: true 

verification_mode: none 

#keystore.path: certs/http.p12

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

# Enable encryption and mutual authentication between cluster nodes 

xpack.security.transport.ssl:

enabled: true 

verification_mode: none 

#keystore.path: certs/transport.p12 

#truststore.path: certs/transport.p12 

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

http.host: 0.0.0.0

transport.host: 0.0.0.0

And this is the Yaml of my new Agent node:


#cluster.name: my-application 

#node.name: node-1 

node.roles: [ "data","master","remote_cluster_client" ] 

path.data: /es-data/elasticsearch 

path.logs: /opt/logs/elasticsearch 

network.host: 0.0.0.0 

http.port: 9200 

discovery.seed_hosts: ["<node-2>:9300","<node-3>:9300","<node-1>:9300"] 

# Enable security features 

xpack.security.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents 

xpack.security.http.ssl:
 
enabled: true
 
verification_mode: none

#keystore.path: certs/http.p12

key: certs/<company-signed>.key

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt

#Enable encryption and mutual authentication between cluster nodes 

xpack.security.transport.ssl:

enabled: true 

verification_mode: none 

#keystore.path: certs/transport.p12

#truststore.path: certs/transport.p12 

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

xpack.security.enrollment.enabled: false 

xpack.security.autoconfiguration.enabled: false 

http.host: 0.0.0.0

transport.host: 0.0.0.0

Read the first article and Skipped the enrollment token steps and decided to set up the node manually changing the Yaml

Please note I have not started my 4th node yet . Want to verify the Yaml first before starting the node. Also I want to know the process of restarting the nodes when I make a cluster name and node name change.

Do I shut off all nodes and restart one by one or change the cluster name on each node and restart it?

I'm using Version 8.17.0

Thanking the community for the help well in advance

When renaming a cluster requires full restart... Ie shut down entire cluster then start them... You can do 1 by one but you should be able to start them all and if properly configured the cluster will sort itself out

Cluster Name Settings

Thank you again. It worked. Now I have a Cluster of 4 nodes.

I restartedy 4th node and it joined successfully.

Final doubt is do I need to change anything in my yaml of the 4th new node i.e

xpack.security.enrollment.enabled: false 

xpack.security.autoconfiguration.enabled: false 

Is this fine as it is or can I completely remove it?

Thank you again for the Guidance and help

Technically now that the node is started I believe you can take them out... OTOH leaving them in does no harm and may remind you when you add another node what to do.

Easy way to check...
Take them out and restart the node and make sure it joins again

Thanks @stephenb for the help and information. It helped a lot.

1 Like