MasterNotDiscoveredException for all queries

I am running ELasticsearch 2.1.0 on Windows. I have one node and I have configured discovery.zen.minimum_master_nodes: 2. I haven't configured discovery.zen.no_master_block at all, so it should have its default write.

Every query I run, including cluster health, list of indices, etc., hangs for 30s and then aborts with

{
  "error" : {
    "root_cause" : [ {
      "type" : "master_not_discovered_exception",
      "reason" : "waited for [30s]"
    } ],
    "type" : "master_not_discovered_exception",
    "reason" : "waited for [30s]"
  },
  "status" : 503
}

Does it happen when the node first starts and can't find the master? I believe you'll get that error there because the node just doesn't know if its data is anywhere near current without connecting to the master for the first time. I imagine no_master_block is for after its connected to the cluster if the master drops out. I haven't dug into that code but that has been my experience so I might not be right.

What I did exactly was:

  • Download Elasticsearch, unzip
  • Start up one node, index some data
  • Start it up a second time, it joins the cluster
  • PUT {"persistent":{"discovery.zen.minimum_master_nodes":2}} to _cluster/settings
  • End the second instance

Now it shows the described behavior.

Never mind. (Unless you do?) I thought requests like GET /_cat/indices, GET /_cluster/setting and GET /_cluster/health would count as read operations. As it seems they don't. Actually querying an index works just fine in a no-master situation.