4

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

Roy Leibovitz
  • 579
  • 5
  • 16

1 Answers1

7

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.

Nate
  • 10,361
  • 3
  • 33
  • 40
Dave Turner
  • 1,846
  • 16
  • 27
  • Hi, Thank you for your answer! My problem is that I didn't deleted any node! I have just unzip the zip file and try to run the elasticsearch.bat file.. – Roy Leibovitz Dec 15 '19 at 15:29
  • 1
    I am certain that somehow you had two nodes running at the same time at some point in the past. Perhaps you ran it twice? It doesn't really matter, the fix is still the same: wipe the data path and try again. – Dave Turner Dec 17 '19 at 08:05