ElasticsearchException connection refused

Hello,

I have this error when I try to search for something using elasticsearch

Caused by: org.springframework.data.elasticsearch.UncategorizedElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused; nested exception is ElasticsearchException[java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused]; nested: ExecutionException[java.net.ConnectException: Connection refused]; nested: ConnectException[Connection refused];
        at org.springframework.data.elasticsearch.core.ElasticsearchExceptionTranslator.translateExceptionIfPossible(ElasticsearchExceptionTranslator.java:72)
        at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.translateException(ElasticsearchRestTemplate.java:601)
        at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.execute(ElasticsearchRestTemplate.java:584)
        at org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate.search(ElasticsearchRestTemplate.java:399)
        at com.test.sit.test.test.service.test.SearchService.generateQueryAndSearch(SearchService.java:136)
        at com.test.sit.test.test.service.test.Mission.getMission(MissionService.java:66)
        at com.test.sit.test.test.service.test.Mission.searchMissionResultByMultiFields(MissionService.java:251)
        at com.test.sit.test.test.ws.controller.Mission.searchMissionResultByMultiFields(MissionController.java:50)

I use:

  • spring-data-elasticsearch version 4.4.0
  • elasticsearch 7.17.6

I need to know if there’s a compatibility between the two librairies. And by any chance, is this error due to the fact that I am using version 7.17.6 and not 7.17.3 ?
Because in the compatibility matrix I have this:

best regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.