ElasticSearch JAVA API gives error after short time

Hi Everybody,

I am new Elastic-search. I started using elastic-search and now reading from writing to elastic-search through Java code. for that i used elasticsearch-1.5.2.jar. I successfully gets connected to elastic-search through transport port 9300.
But after sometime I get following errors at different times.

975920 [elasticsearch[Killpower][generic][T#1]] INFO org.elasticsearch.client.transport - [Killpower] failed to get node info for [#transport#-1][rdsa][inet[/172.20.16.5:9300]], disconnecting...org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[/172.20.16.5:9300]][cluster:monitor/nodes/info] request_id [187] timed out after [5001ms] at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:529) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Error in fetching options ruleorg.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:305) at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:200) at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106) at org.elasticsearch.client.support.AbstractClient.index(AbstractClient.java:98) at org.elasticsearch.client.transport.TransportClient.index(TransportClient.java:326) at org.elasticsearch.action.index.IndexRequestBuilder.doExecute(IndexRequestBuilder.java:313) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65) at storm.starter.bolt.DBWriterBolt.insertDirectiveEventsinDB(DBWriterBolt.java:781) at storm.starter.bolt.DBWriterBolt.execute(DBWriterBolt.java:254) at backtype.storm.topology.BasicBoltExecutor.execute(BasicBoltExecutor.java:32) at backtype.storm.daemon.executor$fn__4050$tuple_action_fn__4052.invoke(executor.clj:566) at backtype.storm.daemon.executor$mk_task_receiver$fn__3976.invoke(executor.clj:345) at backtype.storm.disruptor$clojure_handler$reify__1606.onEvent(disruptor.clj:43) at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:84) at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:58) at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:62) at backtype.storm.daemon.executor$fn__4050$fn__4059$fn__4106.invoke(executor.clj:658) at backtype.storm.util$async_loop$fn__465.invoke(util.clj:377) at clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:745)

Please Help me with your experience and expert opinion. Thank you.

I think that these two are the most common issues:

Please check if your server is of the same version of your client.
And you should configure the clustername in your client: https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html.

I am using elasticsarch 1.5.2 version and the java api I am using is elasticsearch-1.5.2.jar. Both has same version.

Did you ever find a solution? I'm experiencing the same thing.

We had the same issue and we found out we had the problem described here:

1 Like