# ClusterBlockException when master servers(s) return

**URL:** https://discuss.elastic.co/t/clusterblockexception-when-master-servers-s-return/44260
**Category:** Elasticsearch
**Created:** [March 13, 2016, 2:45pm UTC](https://discuss.elastic.co/t/clusterblockexception-when-master-servers-s-return/44260 "2016-03-13T14:45:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Matt\_Chambers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_chambers/32/607_2.png) [@Matt\_Chambers](https://discuss.elastic.co/u/Matt_Chambers)
#### Post date: [March 13, 2016, 2:45pm UTC](https://discuss.elastic.co/t/clusterblockexception-when-master-servers-s-return/44260/1 "2016-03-13T14:45:59Z")

</div>

Hi all, I've looked around for a solution this, tried lots of different settings but I can't seem to fix this.

If all masters are down when a non-master node comes up and fails discovery, I see this message:  
waited for 30s and no initial state was set by the discovery

When the masters come up, the initial requests all throw a org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];

Eventually it recovers. Is there a way to speed this up?

Also, can I catch the ClusterBlockException and then force the unicast discovery to happen, then retry? What Java API call I can make to try and do unicast discovery again?

---

<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: [March 14, 2016, 1:05am UTC](https://discuss.elastic.co/t/clusterblockexception-when-master-servers-s-return/44260/2 "2016-03-14T01:05:29Z")

</div>

> [@Matt\_Chambers](#):
>
> Also, can I catch the ClusterBlockException and then force the unicast discovery to happen, then retry? What Java API call I can make to try and do unicast discovery again?

You can't.

The only option I can think of would be to reduce some of these - [Zen Discovery | Elasticsearch Guide [2.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/modules-discovery-zen.html#fault-detection)

---

<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: [July 5, 2017, 11:08pm UTC](https://discuss.elastic.co/t/clusterblockexception-when-master-servers-s-return/44260/3 "2017-07-05T23:08:46Z")

</div>


