Skip to content

failed to load elasticsearch nodes with docker container. #9647

@iagoquirino

Description

@iagoquirino

Hi

Im trying to connect with elasticsearch using spring boot version 2.0.0.M2 with spring-boot-starter-data-elasticsearch and elasticsearch 5.4.3 via docker container.

When i start the application always raise this exception failed to load elasticsearch nodes:

org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available.

My application.yml config:

spring:
    application:
        name: elastic-demo
    data:
      elasticsearch:
        cluster-nodes: localhost:9300
        cluster-name: docker-cluster

docker container cmd:

docker run -p 9200:9200 -p 9300:9300 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.4.3

Please can anybody help me?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.com

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions