Hi All,
I have issue of fx-elasticsearch not found and i have deploy as docker compose file
one more error i got in same container
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalArgumentException: java.net.UnknownHostException: fx-elasticsearch: Name does not resolve
here is the elasticsearch.yml file
http.host: 0.0.0.0
# Uncomment the following lines for a production cluster deployment
transport.host: 0.0.0.0
#discovery.zen.minimum_master_nodes: 1
#transport.host: localhost
#transport.tcp.port: 9300
#http.port: 9200
#network.bind_host: 0.0.0.0
and here is docker-compose file
fx-elasticsearch:
# image: "elasticsearch:5.0.0"
image: "elasticsearch:6.8.12"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
placement:
constraints: [node.role == manager]
resources:
limits:
memory: 10G
environment:
- ES_JAVA_OPTS=${ELASTICSEARCH_MEM}
- ./elasticsearch.yaml:/usr/share/elasticsearch/config/elasticsearch.yml
- cluster.name=elasticsearch
volumes:
- esdata:/usr/share/elasticsearch/data
logging:
driver: syslog
options:
tag: "{{.Name}}/{{.ID}}"
Here is my .env file
ELASTICSEARCH_HOST=fx-elasticsearch
ELASTICSEARCH_MEM="-Xms4g -Xmx4g"
Please help out