Hello everyone,
I have an issue with the environment variable discovery.type=single-node
when spinning up an Elasticsearch container via docker-compose:
Sample docker-compose file as follows:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
restart: always
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
The expected result would be a running single-node docker container. What actually happens is that I get "ERROR: [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured"
as error message and the Docker container restarts unsuccessfully. When I add the discovery.type=single-node
in the elasticsearch.yml and run the container manually, everything works fine.
EDIT: The error message has nothing to do with the problem. It was caused by manually debugging the issue.
Do you have any suggestions, how can debug this problem further?
Best
lochr