# Can't start elasticsearch 8.5 with docker

**URL:** <https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [November 2, 2022, 4:35pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029 "2022-11-02T16:35:08Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![FatNerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatnerd/32/112847_2.png) [@FatNerd](https://discuss.elastic.co/u/FatNerd)\
**Post date:** [November 2, 2022, 4:35pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/1 "2022-11-02T16:35:08Z")

</div>

I'm trying to execute the `docker-compose.yml` from this page [Install Elasticsearch with Docker | Elasticsearch Guide [8.5] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)  
In the `.env` file, I left everything to default except the two passwords

Ther first service "setup" starts without issues. The second service "es01" fails, here is the end of the output

```auto
{"@timestamp":"2022-11-02T16:20:56.995Z", "log.level": "INFO", "message":"Native controller process has stopped - no new native processes can be started", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"ml-cpp-log-tail-thread","log.logger":"org.elasticsearch.xpack.ml.process.NativeController","elasticsearch.node.name":"es01","elasticsearch.cluster","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":.name":"docker-cluster"}

```

```auto
2022-11-02 16:20:57,001 process reaper (pid 235) ERROR Recursive call to appender rolling   

```

```auto
{"@timestamp":"2022-11-02T15:13:40.397Z", "log.level":"ERROR", "message":"uncaught exception in thread [process reaper (pid 234)]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"process reaper (pid 234)","log.logger":"org.elasticsearch.bootstrap.ElasticsearchUncaughtExceptionHandler","elasticsearch.node.name":"es01","error.type":"java.security.AccessControlException","error.message":"access denied (\"java.lang.RuntimePermission\" \"modifyThread\")","error.stack_trace":"java.security.AccessControlException: access denied (\"java.lang.RuntimePermission\" (I truncated the callstack for brevety)

```

```auto
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
es01_1 exited with code 78

```

---

<div class="post-metadata">

**Author:** ![Isaac\_Ray](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/isaac_ray/32/112862_2.png) [@Isaac\_Ray](https://discuss.elastic.co/u/Isaac_Ray)\
**Post date:** [November 2, 2022, 7:46pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/2 "2022-11-02T19:46:42Z")

</div>

yeah same. Unclear what to do. I made some changes to java.policy per the recommendations of others, but, no dice so far

---

<div class="post-metadata">

**Author:** ![Manjunath\_S\_C\_P](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manjunath_s_c_p/32/99085_2.png) [@Manjunath\_S\_C\_P](https://discuss.elastic.co/u/Manjunath_S_C_P)\
**Post date:** [November 9, 2022, 8:20am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/3 "2022-11-09T08:20:38Z")

</div>

Same issue here. Is this logged as an issue in the github project?

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [November 9, 2022, 10:24am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/4 "2022-11-09T10:24:22Z")

</div>

> [@FatNerd](#):
>
> ```auto
> ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
> es01_1 exited with code 78
> 
> ```

One question for you, what is the OS of server that the docker engine is running on?

---

<div class="post-metadata">

**Author:** ![cdias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cdias/32/114062_2.png) [@cdias](https://discuss.elastic.co/u/cdias)\
**Post date:** [November 9, 2022, 8:34pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/5 "2022-11-09T20:34:19Z")

</div>

`sysctl -w vm.max_map_count=262144` on my host machine worked for me.

---

<div class="post-metadata">

**Author:** ![FatNerd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatnerd/32/112847_2.png) [@FatNerd](https://discuss.elastic.co/u/FatNerd)\
**Post date:** [November 10, 2022, 8:35am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/6 "2022-11-10T08:35:09Z")

</div>

I have Docker Desktop running on a windows machine, but using Linux containers

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [November 10, 2022, 10:15am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/7 "2022-11-10T10:15:25Z")

</div>

Open CMD / Powershell and run following command:  
This command let you access to docker desktop env

```auto
wsl -d docker-desktop

```

And command to increate limit in wsl

```auto
sysctl -w vm.max_map_count=262144

```

---

<div class="post-metadata">

**Author:** ![powerful\_clouds](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/powerful_clouds/32/113213_2.png) [@powerful\_clouds](https://discuss.elastic.co/u/powerful_clouds)\
**Post date:** [November 10, 2022, 12:29pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/8 "2022-11-10T12:29:57Z")

</div>

Hi everyone. I'm running into the same issue when trying to spin up Elasticsearch in a container on my Mac. I only see this error when I set `xpack.security.enabled: true`. When security is disabled, the container runs successfully.

Note: I've tried letting Docker use all the available RAM (16GB) and all the available Swap (4GB). That didn't fix my problem. The reason I tried that is because of the comments on [this stackoverflow answer](https://stackoverflow.com/a/41251595/19487835).  
I've also tried adding the line `RUN sysctl -w vm.max_map_count=262144` to the relevant Dockerfile. That hasn't helped either. I did confirm that the command works by first starting the container with security disabled, executing into the container and running `sysctl -a` to view all the variables; among them was `max_map_count=262144`.

I would very much appreciate any help that you can provide. 🙂

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [November 10, 2022, 3:35pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/9 "2022-11-10T15:35:02Z")

</div>

Did you try to run the command?

From the command line, run:

```auto
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

```

Press enter and use `sysctl` to configure `vm.max_map_count` :

```auto
sysctl -w vm.max_map_count=262144

```

To exit the `screen` session, type `Ctrl a d`.

---

<div class="post-metadata">

**Author:** ![powerful\_clouds](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/powerful_clouds/32/113213_2.png) [@powerful\_clouds](https://discuss.elastic.co/u/powerful_clouds)\
**Post date:** [November 13, 2022, 9:01am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/10 "2022-11-13T09:01:05Z")

</div>

Note: I've never used screen, but I use tmux regularly.  
I'm having trouble running the command you provided.  
`screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty` gives `Cannot exec ... No such file or directory`.

`ls -a ~/Library/Containers/com.docker.docker/Data/vms/0` doesn't show a `tty` file/folder.

In case it's helpful: the Docker version I'm running is 20.10.17, build100c701. The OS version is macOS Monterey 12.6.

---

<div class="post-metadata">

**Author:** ![powerful\_clouds](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/powerful_clouds/32/113213_2.png) [@powerful\_clouds](https://discuss.elastic.co/u/powerful_clouds)\
**Post date:** [November 14, 2022, 1:32pm UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/11 "2022-11-14T13:32:31Z")

</div>

Note: the issue persists on ES v9.5.0. On v9.4.1, I'm not experiencing the issue.

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [November 15, 2022, 5:59am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/12 "2022-11-15T05:59:34Z")

</div>

@powerful_clouds Exactly what error did you have when you have security enabled `xpack.security.enabled: true`?

Did you see the same error message as in the original post, i.e.

> ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.  
> es01\_1 exited with code 78

?  
If so, could you share more logs about exactly which bootstrap check failed? (It should be below the above log line as said in the logging message)

Also, you said

> Note: the issue persists on ES v9.5.0. On v9.4.1, I'm not experiencing the issue.

I assume you meant v8.5.0 and v8.4.1? And you were using docker-compose file from this [documentation page](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)?

---

<div class="post-metadata">

**Author:** ![powerful\_clouds](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/powerful_clouds/32/113213_2.png) [@powerful\_clouds](https://discuss.elastic.co/u/powerful_clouds)\
**Post date:** [November 15, 2022, 9:42am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/13 "2022-11-15T09:42:46Z")

</div>

@Yang_Wang First of all, you're right about me getting the versions mixed up - I definitely meant v8.5.0 and v8.4.1. 🙂

Yes, I did see the exact same error message as in the original post. I can't seem to reproduce the issue now, though, so maybe I did something else wrong initially.

---

<div class="post-metadata">

**Author:** ![bigverm23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigverm23/32/112550_2.png) [@bigverm23](https://discuss.elastic.co/u/bigverm23)\
**Post date:** [December 5, 2022, 12:36am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/14 "2022-12-05T00:36:46Z")

</div>

seeing the same issue just now...what is the resolution?

---

<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:** [January 2, 2023, 12:37am UTC](https://discuss.elastic.co/t/cant-start-elasticsearch-8-5-with-docker/318029/15 "2023-01-02T00:37:12Z")

</div>

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