解决 java.lang.IllegalStateException: Received message from unsupported version: [6.4.3] minimal compatible version is: [6.8.0]

问题:

在 SpringBoot 下用Spring Data Elasticsearch进行 java 对 Elasticsearch 进行单元测试控制台报错:

NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}

日志报以下错误:

解决:

1. pom.xml 中增加 :

<elasticsearch.version>7.3.0</elasticsearch.version>

开发者回答见:https://discuss.elastic.co/t/java-client-or-spring-boot-for-elasticsearch-7-3-1/199778

2. SpringBoot 2.2.0.RELEASE 才可以兼容 Elasticsearch 7.x  

<spring-boot.version>2.2.0.RELEASE</spring-boot.version>

修改version后成功解决!!!

 

posted @ 2022-10-18 18:57  UpZhou  阅读(311)  评论(0编辑  收藏  举报