0

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.

1

2 Answers 2

0

It worked fine with the below versions:

Elastic Search - 5.5.0
Spring Data Elastic Search - 3.0.0.RC2

Sign up to request clarification or add additional context in comments.

Comments

0

You may try to define node in elasticsearch -> elasticsearch.yaml -> node.name

Resolved for us

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.