diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java index c4cb95c501b..1f42557953f 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java @@ -84,6 +84,12 @@ public class TransportClusterHealthAction extends TransportMasterNodeReadAction< executeHealth(request, listener); } + @Override + public void onNoLongerMaster(String source) { + logger.trace("stopped being master while waiting for events with priority [{}]. retrying.", request.waitForEvents()); + doExecute(request, listener); + } + @Override public void onFailure(String source, Throwable t) { logger.error("unexpected failure during [{}]", t, source);