简体   繁体   中英

elasticserch: org.elasticsearch.client.transport.NoNodeAvailableException: No node available

I have update elasticsearch version from elasticsearch-0.90.7 to elasticsearch-1.3.1 and application was working fine in elasticsearch-0.90.7 but in elasticsearch-1.3.1 getting below exception:

2014-07-31/12:49:22.276 [SimpleAsyncTaskExecutor-4]  ERROR step.AbstractStep - Encountered an error executing the step
org.elasticsearch.client.transport.NoNodeAvailableException: No node available
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:219)
at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at org.elasticsearch.client.support.AbstractClient.bulk(AbstractClient.java:149)
at org.elasticsearch.client.transport.TransportClient.bulk(TransportClient.java:354)
at org.elasticsearch.action.bulk.BulkRequestBuilder.doExecute(BulkRequestBuilder.java:165)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:85)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:59)
at com.verisign.rzuingest.batch.RzuFilesIngestionTasklet.execute(Ingestion.groovy:75)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.lang.Thread.run(Thread.java:745)

I am using java client org.springframework.data:spring-data-elasticsearch:1.0.0.M1 to interact with elastic search some thing like:

ElasticsearchTemplate.bulkIndex(index)

How to fix this issue?

TL;DR Update spring-data-elasticsearch library as well

Different major Elasticsearch versions have incompatible transport protocols . It was done to avoid version mismatches in a cluster. You have upgraded your ES to 1.3.1, but your spring data library uses old version of client so it simply can't find other nodes in a cluster - it doesn't know how to communicate them properly.

Just refer to your library documentation to find necessary version to use with ES 1.3.1 and use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM