# 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/23668
**Category:** Elasticsearch
**Created:** [May 22, 2015, 7:39am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/23668 "2015-05-22T07:39:23Z")
**Posts on this page:** 2
**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:39am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/23668/1 "2015-05-22T07:39:23Z")

</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: ![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:12am UTC](https://discuss.elastic.co/t/org-elasticsearch-cluster-block-clusterblockexception-blocked-by-service-unavailable-1-state-not-recovered-initialized/23668/2 "2017-07-06T00:12:29Z")

</div>


