Getting " failed to connect to node [{#transport#-1}{nE-IOaK-SLWdBf7f80Yo2g}{localhost}{}], ignoring..."

I get this error when I try to connect to the ElasticSearch v7.2. Here is my setting in elastic.yml file eml eml
path.logs: d:/temp/logs/elastic
http.port: 9200

Here is my settings: = eml = localhost
elasticsearch.port = 9200
elasticsearch.clustername = eml

I use Spring Boot to connect. but also use HighLevelClient API

Here is my code to configure HighLevel Client.

public class ElasticHighLevelClientConfig {

private String host;

private int port;

private String userName;

private String password;

@Bean(name = "myEsClient", destroyMethod = "close")
public RestHighLevelClient myRestClient() {
	final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
	credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password));
	RestClientBuilder builder = RestClient.builder(new HttpHost(host, port)).setHttpClientConfigCallback(
			httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
	RestHighLevelClient client = new RestHighLevelClient(builder);
	return client;



Can you please post here the full error message with complete stacktrace?

Thanks Thiago for taking a look at my issue. Interestingly, I was able to resolve the issue by downgrading ES from 7.2 to 6.8. It seems the current Spring ElasticSearch with Spring Boot 2.1 does not support ES 7.2.

I will be interested to find out if anybody runs ES 7.2 with Spring Boot 2.1.

When using springboot with
elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your pom.xml:


See documentation here: “How-to” Guides

I will be interested to find out if anybody runs ES 7.2 with Spring Boot 2.1.

I do. Here: GitHub - dadoonet/legacy-search at 06-fuzziness

Thank you David. I will make the change as you suggested and let you know the outcome. Once again I appreciate your response.

I updated my pom.xml by adding:

I updated my pom.xml by adding the following properties:

and the following dependencies:

    <!-- this is now needed because of spring parent which forces a 6.4 version -->

Now, I get this error
Archive for required library: 'D:/Users/vpatel/.m2/repository/org/elasticsearch/client/transport/7.2.0/transport-7.2.0.jar' in project 'EmployerWebService' cannot be read or is not a valid ZIP file"

I also deleted all files/folder under "D:/Users/vpatel/.m2/repository/org/elasticsearch/client/transport/". But I still get this error.

how about synchronized the maven?

Yes. I did "Update Project" after making the change in the POM.

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