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:
discovery.seed_hosts: ["host1", "host2", "host3"]
cluster.initial_master_nodes: ["node-1", "node-2", "node-3"]
P.S. The configured values of
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
But, if I just remove
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?
Thanks in advance.
You'd really need to share your logs.
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.
Gist/pastebin/etc is fine.
Clean up your data path，such as :
rm -rf /some/path/data/* ，then start the node
Initially, I had setup the instance using minimal security (i.e. just the below security setting in
After that, I had done the following:
1)Created a certificate, added the certificate password to keystore in one of the node.
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?
That's not correct, you can use the same directory.
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.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.