I launch spring boot app that should connect with elasticsearch 5.6.1 on macos catalina with globally installed java 14 .
Elasticsearch 5.6.1 run as docker container via next command :
docker run -d --rm --name elastic_5_6_1 -p 9200:9200 -p 9300:9300 -v /Users/user1/Desktop/mcat_elastic/es:/es -e "ES_PATH_CONF=/es/config" -e "discovery.type=single-node" -e "ELASTIC_PASSWORD=test1234" -e "cluster.name=my-cluster" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.6.1
/Users/user1/Desktop/mcat_elastic/es contains folder with name config which store elasticsearch.yml. elasticsearch.yml content is next :
cluster.name: my-cluster
http.port: 9200
path: data: /es/data logs: /es/logs
After start up container in browser on port localhost:9200 I view next :
{ name: "AUaTApX", cluster_name: "my-cluster", cluster_uuid: "yaCjhne4Ry27Ua3Xo2fQVg", version: { number: "5.6.1", build_hash: "667b497", build_date: "2017-09-14T19:22:05.189Z", build_snapshot: false, lucene_version: "6.6.1" }, tagline: "You Know, for Search" }
Then I launch Spring Boot App with version of parent starter 2.2.7.RELEASE.application.yaml properties for connection with elastick container is next :
elasticsearch.clustername=my-cluster
elasticsearch.host=localhost
elasticsearch.port=9300
During execution I get error in console :
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{VBF0z8OiRYqBpuoNcqI5NQ}{localhost}{127.0.0.1:9300}]
I dont understand how to fix it.Please help.