java.lang.RuntimeException: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes were available:
出现上述异常的时候还可能node not connected exception异常。
尤其是上述的异常还可能是偶尔的,间歇性的发生的时候。
在连接时候的参数和端口都指定没有问题的话;一般就是项目中依赖引起的;主要是netty的版本,在使用了dubbo框架的时候,netty版本要与ElasticSearch transport对应传递依赖的netty版本(一般是4.1.16)要一致就可以了。
还有需要注意spring data elasticsearch 与 elasticsearch的版本要匹配,具体匹配的版本,参考其官网地址中的说明:
https://github.com/spring-projects/spring-data-elasticsearch