# 0.20.0 - failed to get local cluster state

**URL:** <https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537>\
**Category:** Elasticsearch\
**Created:** [November 2, 2012, 11:59pm UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537 "2012-11-02T23:59:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 2, 2012, 11:59pm UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/1 "2012-11-02T23:59:47Z")

</div>

Just getting started with ES. I tried to start a client and I am getting  
the below exception

Nov 03, 2012 12:54:48 AM org.elasticsearch.plugins  
INFO: [Boomslang] loaded [], sites []  
Nov 03, 2012 12:54:54 AM org.elasticsearch.client.transport  
INFO: [Boomslang] failed to get local cluster state for [#transport#-1][inet[/127.0.0.1:9300]],  
disconnecting...  
org.elasticsearch.transport.ReceiveTimeoutTransportException:  
[][inet[/127.0.0.1:9300]][cluster/state] request\_id [0] timed out after  
[5001ms]  
at  
org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:342)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
at java.lang.Thread.run(Thread.java:722)

My Java code

public static Client newClient()  
{  
final Settings settings = ImmutableSettings.settingsBuilder()  
.put("cluster.name", "elasticsearch")  
.put("client.transport.sniff", true)  
.build();  
final TransportClient client = new TransportClient(settings);  
client.addTransportAddress(new  
InetSocketTransportAddress("127.0.0.1", 9300));  
return client;  
}

public static void main( String[] args )  
{  
Client client = newClient();

}

What am I doing wrong?

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [November 3, 2012, 12:10am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/2 "2012-11-03T00:10:17Z")

</div>

Are you trying to connect to an external (outside of the JVM) ES instance  
or an embedded one?

If the former, then add ("node.client", true) to your settings. For the  
latter, you can create a client from the node you create.

Cheers,

Ivan

On Fri, Nov 2, 2012 at 4:59 PM, Kennedy Idialu [kennedyidialu@gmail.com](mailto:kennedyidialu@gmail.com)wrote:

> Just getting started with ES. I tried to start a client and I am getting  
> the below exception
> 
> Nov 03, 2012 12:54:48 AM org.elasticsearch.plugins  
> INFO: [Boomslang] loaded , sites   
> Nov 03, 2012 12:54:54 AM org.elasticsearch.client.transport  
> INFO: [Boomslang] failed to get local cluster state for [  
> #transport#-1][inet[/127.0.0.1:9300]], disconnecting...  
> org.elasticsearch.transport.ReceiveTimeoutTransportException:  
> [inet[/127.0.0.1:9300]][cluster/state] request\_id [0] timed out after  
> [5001ms]  
> at  
> org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:342)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> My Java code
> 
> public static Client newClient()  
> {  
> final Settings settings = ImmutableSettings.settingsBuilder()  
> .put("cluster.name", "elasticsearch")  
> .put("client.transport.sniff", true)  
> .build();  
> final TransportClient client = new TransportClient(settings);  
> client.addTransportAddress(new  
> InetSocketTransportAddress("127.0.0.1", 9300));  
> return client;  
> }
> 
> public static void main( String args )  
> {  
> Client client = newClient();
> 
> }
> 
> What am I doing wrong?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 3, 2012, 12:30am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/3 "2012-11-03T00:30:14Z")

</div>

I got it to work by disconnecting internet connection on my localhost. I  
reconnected and tried my the code and it still worked (strange). Thanks for  
trying to help.

On Saturday, 3 November 2012 00:59:47 UTC+1, Kennedy Idialu wrote:

> Just getting started with ES. I tried to start a client and I am getting  
> the below exception
> 
> Nov 03, 2012 12:54:48 AM org.elasticsearch.plugins  
> INFO: [Boomslang] loaded , sites   
> Nov 03, 2012 12:54:54 AM org.elasticsearch.client.transport  
> INFO: [Boomslang] failed to get local cluster state for [#transport#-1][inet[/127.0.0.1:9300]],  
> disconnecting...  
> org.elasticsearch.transport.ReceiveTimeoutTransportException:  
> [inet[/127.0.0.1:9300]][cluster/state] request\_id [0] timed out after  
> [5001ms]  
> at  
> org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:342)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> at java.lang.Thread.run(Thread.java:722)
> 
> My Java code
> 
> public static Client newClient()  
> {  
> final Settings settings = ImmutableSettings.settingsBuilder()  
> .put("cluster.name", "elasticsearch")  
> .put("client.transport.sniff", true)  
> .build();  
> final TransportClient client = new TransportClient(settings);  
> client.addTransportAddress(new  
> InetSocketTransportAddress("127.0.0.1", 9300));  
> return client;  
> }
> 
> public static void main( String args )  
> {  
> Client client = newClient();
> 
> }
> 
> What am I doing wrong?

--

---

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 3, 2012, 12:30am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/4 "2012-11-03T00:30:54Z")

</div>

I got it to work by disconnecting internet connection on my localhost. I  
reconnected and tried my the code and it still worked (strange). Thanks for  
trying to help.

On Saturday, 3 November 2012 01:10:21 UTC+1, Ivan Brusic wrote:

> Are you trying to connect to an external (outside of the JVM) ES instance  
> or an embedded one?
> 
> If the former, then add ("node.client", true) to your settings. For the  
> latter, you can create a client from the node you create.
> 
> Cheers,
> 
> Ivan
> 
> On Fri, Nov 2, 2012 at 4:59 PM, Kennedy Idialu \<[kenned...@gmail.com](mailto:kenned...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Just getting started with ES. I tried to start a client and I am getting  
> > the below exception
> > 
> > Nov 03, 2012 12:54:48 AM org.elasticsearch.plugins  
> > INFO: [Boomslang] loaded , sites   
> > Nov 03, 2012 12:54:54 AM org.elasticsearch.client.transport  
> > INFO: [Boomslang] failed to get local cluster state for [#transport#-1][inet[/127.0.0.1:9300]],  
> > disconnecting...  
> > org.elasticsearch.transport.ReceiveTimeoutTransportException:  
> > [inet[/127.0.0.1:9300]][cluster/state] request\_id [0] timed out after  
> > [5001ms]  
> > at  
> > org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:342)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> > at java.lang.Thread.run(Thread.java:722)
> > 
> > My Java code
> > 
> > public static Client newClient()  
> > {  
> > final Settings settings = ImmutableSettings.settingsBuilder()  
> > .put("cluster.name", "elasticsearch")  
> > .put("client.transport.sniff", true)  
> > .build();  
> > final TransportClient client = new TransportClient(settings);  
> > client.addTransportAddress(new  
> > InetSocketTransportAddress("127.0.0.1", 9300));  
> > return client;  
> > }
> > 
> > public static void main( String args )  
> > {  
> > Client client = newClient();
> > 
> > }
> > 
> > What am I doing wrong?
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 3, 2012, 12:31am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/5 "2012-11-03T00:31:56Z")

</div>

I got it to work by disconnecting internet connection on my localhost. I  
reconnected and tried my the code and it still worked (strange). Thanks for  
trying to help.

On Saturday, 3 November 2012 01:10:21 UTC+1, Ivan Brusic wrote:

> Are you trying to connect to an external (outside of the JVM) ES instance  
> or an embedded one?
> 
> If the former, then add ("node.client", true) to your settings. For the  
> latter, you can create a client from the node you create.
> 
> Cheers,
> 
> Ivan
> 
> On Fri, Nov 2, 2012 at 4:59 PM, Kennedy Idialu \<[kenned...@gmail.com](mailto:kenned...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Just getting started with ES. I tried to start a client and I am getting  
> > the below exception
> > 
> > Nov 03, 2012 12:54:48 AM org.elasticsearch.plugins  
> > INFO: [Boomslang] loaded , sites   
> > Nov 03, 2012 12:54:54 AM org.elasticsearch.client.transport  
> > INFO: [Boomslang] failed to get local cluster state for [#transport#-1][inet[/127.0.0.1:9300]],  
> > disconnecting...  
> > org.elasticsearch.transport.ReceiveTimeoutTransportException:  
> > [inet[/127.0.0.1:9300]][cluster/state] request\_id [0] timed out after  
> > [5001ms]  
> > at  
> > org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:342)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)  
> > at java.lang.Thread.run(Thread.java:722)
> > 
> > My Java code
> > 
> > public static Client newClient()  
> > {  
> > final Settings settings = ImmutableSettings.settingsBuilder()  
> > .put("cluster.name", "elasticsearch")  
> > .put("client.transport.sniff", true)  
> > .build();  
> > final TransportClient client = new TransportClient(settings);  
> > client.addTransportAddress(new  
> > InetSocketTransportAddress("127.0.0.1", 9300));  
> > return client;  
> > }
> > 
> > public static void main( String args )  
> > {  
> > Client client = newClient();
> > 
> > }
> > 
> > What am I doing wrong?
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 3, 2012, 12:33am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/6 "2012-11-03T00:33:23Z")

</div>

I got it to work by disconnecting internet connection on my localhost. I  
reconnected and tried my the code and it still worked (strange). Thanks for  
trying to help.

--

---

<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, 3:06am UTC](https://discuss.elastic.co/t/0-20-0-failed-to-get-local-cluster-state/9537/7 "2017-07-06T03:06:22Z")

</div>


