Created
June 26, 2012 12:48
-
-
Save andrewclegg/2995620 to your computer and use it in GitHub Desktop.
failed to get local cluster state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When I do this: | |
| protected Client newClient() { | |
| final Settings settings = ImmutableSettings.settingsBuilder().build(); | |
| final TransportClient client = new TransportClient(settings); | |
| client.addTransportAddress(new InetSocketTransportAddress("localhost", 9200)); | |
| return client; | |
| } | |
| I get this: | |
| Jun 26, 2012 1:46:38 PM com.pearson.entech.rodeo.agents.CountAgent <init> | |
| INFO: Trying to instantiate ElasticSearch client | |
| 12/06/26 13:46:38 INFO elasticsearch.plugins: [Lang, Cassie] loaded [], sites [] | |
| 12/06/26 13:46:44 INFO client.transport: [Lang, Cassie] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9200]], disconnecting... | |
| org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[localhost/127.0.0.1:9200]][cluster/nodes/info] request_id [0] timed out after [5000ms] | |
| at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:347) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) | |
| at java.lang.Thread.run(Thread.java:662) | |
| But I can send requests via curl to localhost:9200 without any problems. |
I owe you one, dude. Thanks.
I faced the same problem.
Thanks for the precise fix.
Top!
Is there a solution? Thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anyone else gets this: change the port to 9300, that's the transport client's direct TCP port. 9200 is just for HTTP.