# Org.elasticsearch.cluster.block.ClusterBlockException: blocked by: \[SERVICE\_UNAVAILABLE/1/state not recovered / initialized\];

**URL:** https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154
**Category:** Elasticsearch
**Created:** [May 22, 2015, 7:44am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154 "2015-05-22T07:44:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![narsimharaom](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@narsimharaom](https://discuss.elastic.co/u/narsimharaom)
#### Post date: [May 22, 2015, 7:44am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154/1 "2015-05-22T07:44:21Z")

</div>

Hi Everyone,

I am getting below exception in ES when I am trying to querying the data from ES.

My Java code :-

String localhostname = java.net.InetAddress.getLocalHost().getHostName();

```
                            ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder();

                            settings.put("cluster.name", "pstcluster");

                            settings.put("node.name", localhostname + "-eslocalnode");

                            settings.put("node.master", false);

                            settings.put("node.data", false);

                            settings.put("node.max_local_storage_nodes", 1);

                            settings.put("http.enabled", false);

                            settings.put("discovery.zen.ping.multicast.enabled", false);

                            settings.putArray("discovery.zen.ping.unicast.hosts", "172.16.9.19:9300");

```

node =nodeBuilder().clusterName(clusterName).client(true).settings(settings1).node();

node.start();

client = node.client();

* * *

DEBUG 2015-05-22 13:09:17,822  
[elasticsearch[Star-Lord][[unicast\_connect]][T#1]] - [Star-Lord]  
connected to node [[#zen\_unicast\_1#][PST-02][inet[/172.16.9.19:9300]]]  
DEBUG  
2015-05-22 13:09:17,825  
[elasticsearch[Star-Lord][transport\_client\_worker][T#6]{New I/O worker  
#6}] - [Star-Lord] [94] filtering out response from [Keith  
Kilham][wZQwDoZpQkShxrtQbCjYbQ][PST-02][inet[/172.16.9.19:9300]], not  
same cluster\_name [pstescluster]

DEBUG 2015-05-22 13:09:19,323  
[elasticsearch[Star-Lord][transport\_client\_worker][T#6]{New I/O worker  
#6}] - [Star-Lord] [94] filtering out response from [Keith  
Kilham][wZQwDoZpQkShxrtQbCjYbQ][PST-02][inet[/172.16.9.19:9300]], not  
same cluster\_name [pstescluster]

DEBUG 2015-05-22 13:09:20,824  
[elasticsearch[Star-Lord][transport\_client\_worker][T#6]{New I/O worker  
#6}] - [Star-Lord] [94] filtering out response from [Keith  
Kilham][wZQwDoZpQkShxrtQbCjYbQ][PST-02][inet[/172.16.9.19:9300]], not  
same cluster\_name [pstescluster]

DEBUG 2015-05-22 13:09:20,824  
[elasticsearch[Star-Lord][generic][T#4]] - [Star-Lord] disconnecting  
from [[#zen\_unicast\_1#][PST-02][inet[/172.16.9.19:9300]]] due to  
explicit disconnect call

* * *

Exception :-

org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE\_UNAVAILABLE/1/state not recovered / initialized];

```
    at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(ClusterBlocks.java:151)

    at org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(ClusterBlocks.java:141)

    at 

```

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.(TransportSearchTypeAction.java:116)

```
    at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.(TransportSearchDfsQueryThenFetchAction.java:76)

```
    at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.(TransportSearchDfsQueryThenFetchAction.java:69)

```
    at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction.doExecute(TransportSearchDfsQueryThenFetchAction.java:66)

```
    at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction.doExecute(TransportSearchDfsQueryThenFetchAction.java:56)

```
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)

    at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:98)

    at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)

    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)

    at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)

    at org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:334)

    at org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:1122)

    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)

    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)

    at com.jamcracker.jcalert.servlet.JCAlertStartupServlet.service(JCAlertStartupServlet.java:63)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

    at java.lang.Thread.run(Thread.java:745)

```

* * *

Please help on this.

Regards,

Narsimha Rao M.

---

<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 24, 2015, 2:22am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154/2 "2015-05-24T02:22:33Z")

</div>

It means that your cluster is not available.  
What state is it in at the moment - `_cat/health`?

---

<div class="post-metadata">

### Author: ![datval](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@datval](https://discuss.elastic.co/u/datval)
#### Post date: [June 9, 2015, 4:13pm UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154/3 "2015-06-09T16:13:25Z")

</div>

Did you solve the problem?  
I was having the same trouble and removing "http.enabled: false" from configs helped. Have no idea how it can helping.  
Also I am running embedded elasticsearch, so the client node is master and data nodes as well.

---

<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 6, 2017, 12:08am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/1154/4 "2017-07-06T00:08:46Z")

</div>


