-1

I am trying to integrate ElasticSearch with Springboot but I am getting the following error:

"exception": "org.elasticsearch.client.transport.NoNodeAvailableException", "message": "None of the configured nodes are available: [{#transport#-1}{XXXXXXXXXXXXX.us-east-1.aws.found.io}{54.221.223.25:9243}]",

Maven:

<dependency> 
    <groupId>org.springframework.boot</groupId>   
    <artifactId>spring-boot-starter-data-elasticsearch</artifactId>   
    <version>1.5.9.RELEASE</version> 
</dependency>

Config:

Settings esSettings = Settings.settingsBuilder()
                         .put("cluster.name", EsClusterName)
                         .build();

return TransportClient.builder()
        .settings(esSettings)
        .build()
        .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(EsHost), EsPort));
}

@Bean
public ElasticsearchOperations elasticsearchTemplate() throws Exception {
    return new ElasticsearchTemplate(client());
}

application.properties:

elasticsearch.cluster-name=8cf2fXXXXXXXXafbdc34d3
spring.data.elasticsearch.properties.username=elastic
spring.data.elasticsearch.properties.password=xxxxxxxxxxxxxxxxxxx
spring.data.elasticsearch.properties.http.enabled=true
elasticsearch.host=xxxxxxxxxxxxx.us-east-1.aws.found.io
elasticsearch.port=9243
spring.data.elasticsearch.repositories.enabled=true
t j
  • 7,026
  • 12
  • 46
  • 66

1 Answers1

-1

Did you check your ES server version? Spring boot 1.5.9.RELEASE works only with ES 2.

If you have ES 5.5 you have to upgrade to Spring boot 2.

If you have an ES 6+, you are stuck for now (well this is where I am with my investigations).

Alban
  • 74
  • 8