Org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];


(Narsimha Rao ) #1

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.


(system) #2