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

旧街凉风 提交于 2019-12-24 11:27:48

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/25053396/elasticserch-org-elasticsearch-client-transport-nonodeavailableexception-no-no

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!