Getting “master not discovered exception” even running only one node

Hi there,

I am using Elasticsearch 7.6.0 and I only have one node. But I still getting the exception, master_not_discovered_exception when running
curl -H "Content-Type: application/json" -XPUT 127.0.0.1:9200/movies -d '

> {
> "mappings":{
> "properties":{
> "year":{
> "type":"date"
> }
> }
> }
> }'

Error:
{"error":{"root_cause":[{"type":"master_not_discovered_exception","reason":null}],"type":"master_not_discovered_exception","reason":null},"status":503}

This is what I get when I curl -XGET 'http://127.0.0.1:9200/_cluster/health?pretty'

    {
      "error" : {
        "root_cause" : [
          {
            "type" : "master_not_discovered_exception",
            "reason" : null
          }
        ],
        "type" : "master_not_discovered_exception",
        "reason" : null
      },
      "status" : 503
    }

This is what i get when I curl -XGET 127.0.0.1:9200

        {
          "name" : "node-1",
          "cluster_name" : "elasticsearch",
          "cluster_uuid" : "_na_",
          "version" : {
            "number" : "7.6.1",
            "build_flavor" : "default",
            "build_type" : "deb",
            "build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
            "build_date" : "2020-02-29T00:15:25.529771Z",
            "build_snapshot" : false,
            "lucene_version" : "8.4.0",
            "minimum_wire_compatibility_version" : "6.8.0",
            "minimum_index_compatibility_version" : "6.0.0-beta1"
          },
          "tagline" : "You Know, for Search"
        }

This is my elasticsearch.yml (I only revised these 4 area):

node.name: node-1
network.host: 0.0.0.0
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["node-1"]

This is my netstat -tuplen

Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      101        17100      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          22836      -
tcp6       0      0 :::9300                 :::*                    LISTEN      111        28712      -
tcp6       0      0 :::22                   :::*                    LISTEN      0          22847      -
tcp6       0      0 :::9200                 :::*                    LISTEN      111        28793      -
udp        0      0 127.0.0.53:53           0.0.0.0:*                           101        17099      -
udp        0      0 10.0.2.15:68            0.0.0.0:*                           100        17032 

I also have elasticsearch on my local but I didn't start it. And the elasticsearch has error is running on my VM : ubuntu-18.04.4

Please help! Thanks a lot!

I just solved the problem by stopped the ES which run on my local.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.