Development cluster bootstrap error

I am trying to start elasticsearch 7.2 in development server after installation. when I started first I saw error related to "master not discovered or elected yet, an election requires two nodes ..", then I have tried to change the bootstrap parameters but still got the same error.

cluster.initial_master_nodes: ["node-1", "node-2"]
cluster.initial_master_nodes: ["server1"]
discovery.zen.minimum_master_nodes: 1

After some reading on this topic from documentation, I understood that elastic cluster forms on its own with default settings on single machine in development environments.So I reverted all configuration changes in elasticsearch.yml fille and deleted the node data in /data/node folder , then tried to start up but in vain.

Similar error now ...but might be different one .. any fix for this regard ?

[2019-08-02T17:28:28,361][WARN ][o.e.c.c.ClusterFormationFailureHelper] [eai01] master not discovered or elected yet, an election requires two nodes with ids [MZKMYB3QTQKf8HFgwsW9oQ, 0vF9FzHyRmWmjZdo_mSgsA], have discovered [{eai01}{0vF9FzHyRmWmjZdo_mSgsA}{6nSApSurTJmCnWj-yhwoeA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=33737089024, ml.max_open_jobs=20, xpack.installed=true}] which is not a quorum; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{eai01}{MZKMYB3QTQKf8HFgwsW9oQ}{AB60Eqs9ScSHIfs8u4ZtKQ}{127.0.0.1}{127.0.0.1:9301}{ml.machine_memory=33737089024, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

It looks like you did not delete all the contents of the data folder, because an election requires two nodes with ids [MZKMYB3QTQKf8HFgwsW9oQ, 0vF9FzHyRmWmjZdo_mSgsA]. This requirement is being read from the data folder. Ensure that you're really clearing it out.

I have deleted the <ES_HOME>/nodes folder and restarted, but still same error

][WARN ][o.e.c.c.ClusterFormationFailureHelper] [eai01] master not discovered or elected yet, an election requires two nodes with ids [MF-OJtxoTqyvT-al56F2bA, 0vF9FzHyRmWmjZdo_mSgsA], have discovered [{eai01}{0vF9FzHyRmWmjZdo_mSgsA}{6nSApSurTJmCnWj-yhwoeA}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=33737089024, ml.max_open_jobs=20, xpack.installed=true}] which is not a quorum; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{eai01}{MF-OJtxoTqyvT-al56F2bA}{WFKqp_GGQ4SRHel4yZuU9w}{127.0.0.1}{127.0.0.1:9301}{ml.machine_memory=33737089024, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

This tells us that <ES_HOME>/nodes is not where Elasticsearch is keeping its data.

This is the path as when I delete the contents of this directory and restart its creating the directory /data/nodes/0 folders. as per documentation also this is the path by default if you don't specify anything in elasticsearch.yml file. I tried changing the data path to some other directory and restarted as well, but still get the same error.

You seem to have two nodes running at the same time, both with the same node name eai01? Did you shut them both down and clear out both of their data paths before starting them up again? Can you share all the log messages from both nodes from when they start up until the first time they log master not discovered or elected yet?

1 Like

My bad, there was another elastic process running with different user on the same host. I have deleted the data folder but process still running, killed that processes and restarted elastic with my user. Its running now, Thank you !

1 Like