# ClusterBlockException:blocked by: \[SERVICE\_UNAVAILABLE/1/state not recovered /initialized\]

**URL:** https://discuss.elastic.co/t/clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/169535
**Category:** Elasticsearch
**Created:** [February 22, 2019, 8:55am UTC](https://discuss.elastic.co/t/clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/169535 "2019-02-22T08:55:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vincentduan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincentduan/32/30691_2.png) [@vincentduan](https://discuss.elastic.co/u/vincentduan)
#### Post date: [February 22, 2019, 8:55am UTC](https://discuss.elastic.co/t/clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/169535/1 "2019-02-22T08:55:56Z")

</div>

I have 12nodes (include 3 master nodes and 9 data nodes).  
I use Elasticsearch 6.2.3 , ubuntu desktop 512G Memory, about 1000shards in cluster.  
Yesterday, the cluster status got red , because one of my data nodes crashed .  
While I restarted my crashed node , the cluster still red.  
when I use elasticsearch-head check my cluster , the node log shows below:

```auto
Caused by : org.elasticsearch.discovery.MasterNotDiscoveredException: ClusterBlockException[blocked by:[SERVICE_UNAVAILABLE/1/state not recovered /initialized];]
at....
....
....
[WARN] [r.suppressed] path: /_aliases, params:{} 
org.elasticsearch.transport.RemoteTransportException: [master1][192.168.1.103:9300][indices:admin/get]
Caused by: org.elasticsearch.discovery.MasterNotDiscoveredException: 
ClusterBlockException[blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized]]
at ...
...
...

```

---

<div class="post-metadata">

### Author: ![vincentduan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincentduan/32/30691_2.png) [@vincentduan](https://discuss.elastic.co/u/vincentduan)
#### Post date: [February 22, 2019, 2:13pm UTC](https://discuss.elastic.co/t/clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/169535/2 "2019-02-22T14:13:06Z")

</div>

issued！  
`gateway.recover_after_nodes` is the key to problem. I set 10 while only 9 data nodes available.

---

<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: [March 22, 2019, 2:19pm UTC](https://discuss.elastic.co/t/clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/169535/3 "2019-03-22T14:19:55Z")

</div>

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