I am trying to connect to Elasticsearch 5 using spring data Elasticsearch.
As per the link - https://github.com/spring-projects/spring-data-elasticsearch ,spring data elastic search - 3.0.0.M4 is compatible with Elasticsearch 5.4.0
But I am getting the below error while trying to connect to Elasticsearch
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{ERkAnVs8Rn2Vp_kkJFwOWA}{127.0.0.1}{127.0.0.1:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:348)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:246)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:366)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:397)
at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1250)
at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.exists(AbstractClient.java:1272)
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.indexExists(ElasticsearchTemplate.java:630)
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.createIndexIfNotCreated(ElasticsearchTemplate.java:911)
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.createIndex(ElasticsearchTemplate.java:164)
at com.javacodegeeks.spring.elasticsearch.LearnElasticSearch.loadData(LearnElasticSearch.java:84)
at com.javacodegeeks.spring.elasticsearch.LearnElasticSearch.main(LearnElasticSearch.java:38)
Let me know if any of you could successfully connect to Elasticsearch 5 or above version using spring data Elasticsearch.