# Cluster High-Availability

**URL:** <https://discuss.elastic.co/t/cluster-high-availability/179915>\
**Category:** Elasticsearch\
**Created:** [May 7, 2019, 8:02am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915 "2019-05-07T08:02:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fim/32/90645_2.png) [@fim](https://discuss.elastic.co/u/fim)\
**Post date:** [May 7, 2019, 8:02am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915/1 "2019-05-07T08:02:51Z")

</div>

I suppose to have a problem in my configuration that the master node is not switching properly.

We operate a two node cluster (test environment), later it will be a three-node cluster (production environment). For testing purposes I stopped a node in the two node cluster environment. When I CURL or Postman the cluster I'll receive the following error messages:

```
[user01@host02 ~]$ curl -XGET elastic:elastic@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
    }

```

![image](https://us1.discourse-cdn.com/elastic/original/3X/9/e/9eddcaf4dd5357a543ee9e47f8e2335f9426e73d.png)

Even I can't explain why Kibana shows Cluster Status "Green"  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f53459b1fff825b57e89489ac3fec775a057a090.png)

May somebody help me with this issue?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 7, 2019, 8:17am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915/2 "2019-05-07T08:17:10Z")

</div>

What version are you on? What do your logs show?

---

<div class="post-metadata">

**Author:** ![fim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fim/32/90645_2.png) [@fim](https://discuss.elastic.co/u/fim)\
**Post date:** [May 7, 2019, 8:31am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915/3 "2019-05-07T08:31:41Z")

</div>

ES version 7.0.0

```
[2019-05-07T10:25:25,099][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [sag-tst-es-002.sag.services] timed out while retrying [cluster:monitor/state] after failure (timeout [30s])
[2019-05-07T10:25:25,099][WARN][r.suppressed] [sag-tst-es-002.sag.services] path: /_cluster/settings, params: {include_defaults=true}
org.elasticsearch.discovery.MasterNotDiscoveredException: null
        at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$4.onTimeout(TransportMasterNodeAction.java:259) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.cluster.ClusterStateObserver$ContextPreservingListener.onTimeout(ClusterStateObserver.java:322) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:249) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.cluster.service.ClusterApplierService$NotifyTimeout.run(ClusterApplierService.java:555) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:681) [elasticsearch-7.0.0.jar:7.0.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:835) [?:?]
[2019-05-07T10:25:25,100][DEBUG][o.e.a.a.c.s.TransportClusterStateAction] [sag-tst-es-002.sag.services] no known master node, scheduling a retry
[2019-05-07T10:25:25,105][WARN][r.suppressed] [sag-tst-es-002.sag.services] path: /_monitoring/bulk, params: {system_id=kibana, system_api_version=6, interval=10000ms}
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/2/no master];
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:191) ~[elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(ClusterBlocks.java:177) ~[elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.monitoring.action.TransportMonitoringBulkAction.doExecute(TransportMonitoringBulkAction.java:55) ~[?:?]
        at org.elasticsearch.xpack.monitoring.action.TransportMonitoringBulkAction.doExecute(TransportMonitoringBulkAction.java:35) ~[?:?]
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:145) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:86) [x-pack-security-7.0.0.jar:7.0.0]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:61) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:171) [x-pack-security-7.0.0.jar:7.0.0]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:61) [elasticsearch-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$authorizeAction$4(AuthorizationService.java:238) [x-pack-security-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:604) [x-pack-security-7.0.0.jar:7.0.0]
        at org.elasticsearch.xpack.security.authz.AuthorizationService$AuthorizationResultListener.onResponse(AuthorizationService.java:579) [x-pack-security-7.0.0.jar:7.0.0]
...
```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 7, 2019, 8:33am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915/4 "2019-05-07T08:33:51Z")

</div>

A two-node cluster cannot be made highly available, because you always require a majority of master-eligible nodes to be available and a majority of two nodes is two nodes. You need at least three nodes for high availability. This isn't a limitation in Elasticsearch so much as a fundamental property of distributed systems.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 4, 2019, 8:33am UTC](https://discuss.elastic.co/t/cluster-high-availability/179915/5 "2019-06-04T08:33:53Z")

</div>

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