Master not discovered or elected yet (elastic search 7.4)

Hello,

I am trying to do a install test of elasticsearc 7.4 en RedHat.

As configuration file elasticsearch.yml use:

   cluster.name: my-application
   node.name: node-1

   path.data: /var/lib/elasticsearch
   path.logs: /var/log/elasticsearch

I add down trace when create instance (./bin/elasticsearch)

When I run 'healthy' (curl -XGET 'localhost:9200/_cluster/health?pretty'), I receive the error: 'master_not_discovered_exception'

Can anybody help me ?

Thanks!!

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-11-21T14:33:27,600][INFO ][o.e.e.NodeEnvironment    ] [node-1] using [1] data paths, mounts [[/var (/dev/mapper/vgroot-lvvar)]], net usable_space [2.5gb], net total_space [3.9gb], types [xfs]
[2019-11-21T14:33:27,604][INFO ][o.e.e.NodeEnvironment    ] [node-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2019-11-21T14:33:27,624][INFO ][o.e.n.Node               ] [node-1] node name [node-1], node ID [mhWP4YtsR_CafLNY8DlC0A], cluster name [my-application]
[2019-11-21T14:33:27,624][INFO ][o.e.n.Node               ] [node-1] version[7.4.2], pid[53499], build[oss/rpm/2f90bbf7b93631e52bafb59b3b049cb44ec25e96/2019-10-28T20:40:44.881551Z], OS[Linux/3.10.0-957.21.3.el7.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/13.0.1/13.0.1+9]
[2019-11-21T14:33:27,625][INFO ][o.e.n.Node               ] [node-1] JVM home [/usr/share/elasticsearch/jdk]
[2019-11-21T14:33:27,625][INFO ][o.e.n.Node               ] [node-1] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/usr/share/elasticsearch/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Dio.netty.allocator.type=pooled, -XX:MaxDirectMemorySize=1073741824, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=oss, -Des.distribution.type=rpm, -Des.bundled_jdk=true]
[2019-11-21T14:33:29,437][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [aggs-matrix-stats]
[2019-11-21T14:33:29,438][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [analysis-common]
[2019-11-21T14:33:29,438][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-common]
[2019-11-21T14:33:29,438][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-geoip]
[2019-11-21T14:33:29,438][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-user-agent]
[2019-11-21T14:33:29,439][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-expression]
[2019-11-21T14:33:29,439][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-mustache]
[2019-11-21T14:33:29,442][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-painless]
[2019-11-21T14:33:29,442][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [mapper-extras]
[2019-11-21T14:33:29,443][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [parent-join]
[2019-11-21T14:33:29,443][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [percolator]
[2019-11-21T14:33:29,443][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [rank-eval]
[2019-11-21T14:33:29,443][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [reindex]
[2019-11-21T14:33:29,444][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [repository-url]
[2019-11-21T14:33:29,444][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [systemd]
[2019-11-21T14:33:29,444][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [transport-netty4]
[2019-11-21T14:33:29,445][INFO ][o.e.p.PluginsService     ] [node-1] no plugins loaded
[2019-11-21T14:33:33,905][INFO ][o.e.d.DiscoveryModule    ] [node-1] using discovery type [zen] and seed hosts providers [settings]
[2019-11-21T14:33:34,960][INFO ][o.e.n.Node               ] [node-1] initialized
[2019-11-21T14:33:34,961][INFO ][o.e.n.Node               ] [node-1] starting ...
[2019-11-21T14:33:35,380][INFO ][o.e.t.TransportService   ] [node-1] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2019-11-21T14:33:35,393][WARN ][o.e.b.BootstrapChecks    ] [node-1] max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2019-11-21T14:33:35,394][WARN ][o.e.b.BootstrapChecks    ] [node-1] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
[2019-11-21T14:33:35,416][INFO ][o.e.c.c.ClusterBootstrapService] [node-1] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2019-11-21T14:33:45,418][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered or elected yet, an election requires two nodes with ids [DowReUd3TsG9AywBQNZLog, mhWP4YtsR_CafLNY8DlC0A], have discovered [{node-1}{mhWP4YtsR_CafLNY8DlC0A}{NXWeBlRxROGPj6Q1MCnbTg}{127.0.0.1}{127.0.0.1:9300}{dim}] 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]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{node-1}{mhWP4YtsR_CafLNY8DlC0A}{NXWeBlRxROGPj6Q1MCnbTg}{127.0.0.1}{127.0.0.1:9300}{dim}] from last-known cluster state; node term 1, last-accepted version 0 in term 0
[2019-11-21T14:33:55,427][WARN ][o.e.c.c.ClusterFormationFailureHelper] [node-1] master not discovered or elected yet, an election requires two nodes with ids [DowReUd3TsG9AywBQNZLog, mhWP4YtsR_CafLNY8DlC0A], have discovered [{node-1}{mhWP4YtsR_CafLNY8DlC0A}{NXWeBlRxROGPj6Q1MCnbTg}{127.0.0.1}{127.0.0.1:9300}{dim}] 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]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{node-1}{mhWP4YtsR_CafLNY8DlC0A}{NXWeBlRxROGPj6Q1MCnbTg}{127.0.0.1}{127.0.0.1:9300}{dim}] from last-known cluster state; node term 1, last-accepted version 0 in term 0

Hi Alejandro,

At some point this node was part of a larger cluster, or at least it discovered another node with a different ID, so it can't safely start up alone. If this wasn't your intention then I suggest deleting the contents of your data path, /var/lib/elasticsearch, and trying again.

Also please make sure your posts are formatted so as to be easy to read, using the </> button for logs etc. I've fixed this one for you.

I have deleted the folder /var/lib/elasticsearch and run sucessly.

Thank you very much for the help

1 Like