I am trying to setup a 3 node cluster using Elasticsearch-7.17.0 in linux. I have made the following configurations in elasticsearch.yml file of all 3 nodes:
P.S. The configured values of path.data and path.logs are outside of Elasticsearch folder.
With this configuration, when I start each node it is choosing itself as master and doesn't try to contact the other nodes configured in discovery.seed_hosts or cluster.initial_master_nodes.
But, if I just remove path.data and path.logs configurations from elasticsearch.yml file, it's working as expected. Hence I do not understand the reason for this strange behavior. Can anyone help me with this issue?
Sure. I can share the logs for both working and non-working scenarios. Since the text is quite big, I don't think pasting it here is a good idea. So let me know how you want me to share it. Thanks.
Initially, I had setup the instance using minimal security (i.e. just the below security setting in elasticsearch.yml file)
xpack.security.enabled: true
After that, I had done the following:
1)Created a certificate, added the certificate password to keystore in one of the node.
2)Copied elasticsearch.keystore and the certificate from the first node to $ES_HOME\config path of other 2 nodes.
Then I had tried to start Elasticsearch on all nodes and that's when I hit the above error. As casterQ suggested above, I changed the path.data setting to a different folder and things are working as expected.
So, my question is if a node is setup with minimal security initially and later updated to enable basic security can no longer be able to use the initial data folder?
Thanks for the confirmation. But somehow this didn't work for me. As mentioned, I had initially started the server with single-node settings and later added configurations to elasticsearch.yml to make it a part of a cluster. But even after specifying required cluster configurations, it was not trying to discover other nodes (observed through logs) and electing itself as master. Only when I specified a different data folder path, things started working as expected (i.e. it was trying to discover other nodes). But I didn't face this problem when initially I setup the node with cluster configurations.
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.