springboot整合elasticsearch报NoNodeAvailableException: None of the configured nodes are available: [{#t
首先确保端口号和spring.data.elasticsearch.cluster-name无误!
接着我们先看下本地条件:
elasticsearch 5.5.0 ,使用idea创建的默认2.1.2版本的springboot,pom.xml部分截图如下:
然后我们查看idea maven帮我们导入的elasticsearch版本,发现是6.4.3的
很明显,这次的版本是高于本地的elasticsearch版本的,于是我们修改pom.xml,将springboot降为2.0.0版本,查询修改后的pom.xml:
再次查询maven帮我们导入的elasticsearch版本:
这次变成了5.6.8和本地的5.5.0能够兼容,启动不再报错,ok.