I have two servers for elasticsearch. After I installed the elasticsearch on one server, I started the service and ran /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node to generate an environment token. Then, I installed the elasticsearch on the other server, I reconfigured the new node by running
/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token eyJ2Z***rQSJ9
This node will be reconfigured to join an existing cluster, using the enrollment token that you provided.
This operation will overwrite the existing configuration. Specifically:
- Security auto configuration will be removed from elasticsearch.yml
- The [certs] config directory will be removed
- Security auto configuration related secure settings will be removed from the elasticsearch.keystore
Do you want to continue with the reconfiguration process [y/N]y
Then, I started the elasticsearch service on the second server.
However, the log file give me FAILED error:
[newnode] handshake to [10.0.0.12:9300] failed
java.lang.IllegalStateException: handshake with [{10.0.0.12:9300}{Y4Snh**oQ}{10.0.0.12}{10.0.0.12:9300}{7.17.0}] failed: remote cluster name [ElasticSearch] does not match local cluster name [elasticsearch]
I only set up a cluster name for the first node. I did not set up any cluster name for the new node. How can I fix the cluster name issue? Thanks.
On the first server, I got a warning message in the log.
This node is a fully-formed single-node cluster with cluster UUID [nTodc**WWA], but it is configured as if to discover other nodes and form a multi-node cluster via the [discovery.seed_hosts=[10.0.0.12:9300, 10.0.0.13:9300]] setting. Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s). Remove the discovery configuration to suppress this message.
I want to make a multi-node cluster. How should I set up the cluster mode on the node?
Thank you for replying my question. I checked my cluster name again. I found I made a mistake which has wasted much time.. I used one uppercase letter in the name on the first server. Right now, the cluster has been set up well.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.