# How to start Elasticsearch database from exist volume on docker

**URL:** <https://discuss.elastic.co/t/how-to-start-elasticsearch-database-from-exist-volume-on-docker/272543>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 10, 2021, 7:30am UTC](https://discuss.elastic.co/t/how-to-start-elasticsearch-database-from-exist-volume-on-docker/272543 "2021-05-10T07:30:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![overbid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/overbid/32/87426_2.png) [@overbid](https://discuss.elastic.co/u/overbid)\
**Post date:** [May 10, 2021, 7:30am UTC](https://discuss.elastic.co/t/how-to-start-elasticsearch-database-from-exist-volume-on-docker/272543/1 "2021-05-10T07:30:39Z")

</div>

I'm trying to install via docker compose in 3 machines on AWS EC2. My compose file is

```
version: "3.8"
services:
  es01:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
    container_name: es01
    environment:
      - node.name=es01
      - cluster.name=es-cluster
      - discovery.seed_hosts=es02,es03
      - cluster.initial_master_nodes=es01,es02,es03
      - bootstrap.memory_lock=true
      - ES_JAVA_OPTS=-Xms${MEM} -Xmx${MEM}
      - network.publish_host=${ES01}
      - index.codec=best_compression
      - xpack.security.enabled=true
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - data01:/usr/share/elasticsearch/data
    extra_hosts:
      - es02:${ES02}
      - es03:${ES03}
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - elastic
  
volumes:
  data01:
    driver: local

networks:
  elastic:
    driver: bridge

```

It's work well but after stop es03 and es01, es02 still start.  
In empty volume the es03 can join cluster but if start es03 with exist volume that got errors.

```
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,442Z", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
es03 | ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
es03 | bootstrap check failure [1] of [1]: Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
es03 | ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/es-thaicom-cluster.log
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,475Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "stopping ..." }
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,499Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "stopped" }
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,499Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "closing ..." }
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,514Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "closed" }
es03 | {"type": "server", "timestamp": "2021-05-10T06:57:14,516Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "es-thaicom-cluster", "node.name": "es03", "message": "Native controller process has stopped - no new native processes can be started" }
es03 exited with code 78

```

How do I fix it.

---

<div class="post-metadata">

**Author:** ![overbid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/overbid/32/87426_2.png) [@overbid](https://discuss.elastic.co/u/overbid)\
**Post date:** [May 11, 2021, 1:51am UTC](https://discuss.elastic.co/t/how-to-start-elasticsearch-database-from-exist-volume-on-docker/272543/2 "2021-05-11T01:51:36Z")

</div>

I found it's work when disable security packs or enable it with ssl.

---

<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:** [June 8, 2021, 1:51am UTC](https://discuss.elastic.co/t/how-to-start-elasticsearch-database-from-exist-volume-on-docker/272543/3 "2021-06-08T01:51:41Z")

</div>

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