4
votes

I am trying to set up ElasticSearch 7.3.1 in single-node cluster.

I tried adding:

discovery.type: single-node

But then I get the following error:

java.lang.IllegalStateException: cannot start with [discovery.type] set to [single-node] when local node {node-1}{O846-1yHRLiOGzLUx 4RycQ}{KKT2Ljj3QUWiFR4K1ICrDg}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machine_memory=17179262976, xpack.installed=true, ml.max_open_jobs=20} does not have quorum in voting configura tion VotingConfiguration

If i remove the line discovery.type: single-node then I get the following error:

master not discovered or elected yet, an election requires two nodes with ids [O846-1yHRLiOGzLUx 4RycQ, j1tBqJEtSXO78j6Ym8OceA], have discovered [{node-1}{O846-1yHRLiOGzLUx4RycQ}{KE4tPTGtS7ukT7k-6iLxaw}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machine_memory=17179262976, xpack.in stalled=true, ml.max_open_jobs=20}] which is not a quorum; discovery will continue using [127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9 301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{node-1}{O846-1yHRLiOGzLUx4RycQ}{KE4tPTGtS7ukT7k-6iLxaw}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machin e_memory=17179262976, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

1
I didnt set that config for only one node - Wonka
I didnt understand your comment - Roy Leibovitz
@Roy I am facing similar problem.Did you resolved this issue? - Madhesh

1 Answers

4
votes

an election requires two nodes with ids [O846-1yHRLiOGzLUx 4RycQ, j1tBqJEtSXO78j6Ym8OceA],

This node previously belonged to a 2-node cluster, and you have removed one (i.e. half of them) without following the proper procedure which is required to do this without losing data.

There are two ways forward:

  1. Form the 2-node cluster again and then remove one node properly.

  2. Wipe the data path and start again afresh.