# Elasticsearch Cluster Down automatically

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-down-automatically/347808>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring, docker\
**Created:** [November 23, 2023, 3:49am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-down-automatically/347808 "2023-11-23T03:49:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VijayIQA](https://avatars.discourse-cdn.com/v4/letter/v/e19b73/32.png) [@VijayIQA](https://discuss.elastic.co/u/VijayIQA)\
**Post date:** [November 23, 2023, 3:49am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-down-automatically/347808/1 "2023-11-23T03:49:13Z")

</div>

Hi Team, I deployed Elasticsearch Cluster on docker with 2 nodes (two containers). everything working well. but due to some technical issues sometimes need to restart the containers at that time master node up and running but data node terminating throwing an error log as this node already part of other node. if execute any command on master node stating that unable to determine the cluster health. here is my configuration of the cluster.

Docker file

```auto
FROM elasticsearch:8.8.1
RUN mkdir iqarepo
ENV http.host=0.0.0.0
ENV transport.host=0.0.0.0
ENV cluster.name=docker-cluster
ENV bootstrap.memory_lock=false
ENV path.repo=/usr/share/elasticsearch/iqarepo/
ENV path.logs=/var/log/elasticsearh/
CMD ["elasticsearch"]

```

docker command:

```auto
docker run --name es1 -p 9200:9200 -p 9300:9300 \
  --env http.host=0.0.0.0 \
  --env transport.host=0.0.0.0 \
  --env transport.port=9300 \
  --env http.port=9200 \
  --env ES_JAVA_OPTS="-Xms1g -Xmx1g" \
  --volume /data/es1/:/usr/share/elasticsearch/data \
  --volume /data/logs/:/var/log/elasticsearh/ \
  --volume /data/iqarepo/:/usr/share/elasticsearch/iqarepo/ \
  --env reindex.remote.whitelist='0.0.0.0:9200' \
  --volume /data/config/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties \
  --detach es

```

docker command for node:

```auto
 docker run --name es2 -p 9400:9200 -p 9600:9300 \
  --env http.host=0.0.0.0 \
  --env transport.host=0.0.0.0 \
  --env transport.port=9300 \
  --env http.port=9200 \
  --env ES_JAVA_OPTS="-Xms1g -Xmx1g" \
  --env ENROLLMENT_TOKEN=<token> \
  --volume /data/es2/:/usr/share/elasticsearch/data \
  --volume /data/logs1/:/var/log/elasticsearh/ \
  --volume /data/iqarepo/:/usr/share/elasticsearch/iqarepo/ \
  --detach es

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 21, 2023, 3:49am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-down-automatically/347808/2 "2023-12-21T03:49:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
