# Issue with Elasticsearch Docker Deployment on Apple Silicon (M4 Processor, macOS 15.2)

**URL:** <https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [January 15, 2025, 5:05am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214 "2025-01-15T05:05:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepflyz](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@deepflyz](https://discuss.elastic.co/u/deepflyz)\
**Post date:** [January 15, 2025, 5:05am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214/1 "2025-01-15T05:05:07Z")

</div>

There is a current issue with deploying Elasticsearch via Docker on Mac computers equipped with Apple silicon (M4 processor) and running macOS 15.2.

Here is the error log:

```auto
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # A fatal error has been detected by the Java Runtime Environment:
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # SIGILL (0x4) at pc=0x0000ffff77c680a8, pid=8, tid=17
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # JRE version: (23.0+37) (build )
2025-01-15 11:55:22 # Java VM: OpenJDK 64-Bit Server VM (23+37-2369, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
2025-01-15 11:55:22 # Problematic frame:
2025-01-15 11:55:22 # j java.lang.System.registerNatives()V+0 java.base@23
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # An error report file with more information is saved as:
2025-01-15 11:55:22 # /usr/share/elasticsearch/hs_err_pid8.log
2025-01-15 11:55:22 [0.011s][warning][os] Loading hsdis library failed
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # The crash happened outside the Java Virtual Machine in native code.
2025-01-15 11:55:22 # See problematic frame for where to report the bug.
2025-01-15 11:55:22 #
2025-01-15 11:55:22 /usr/local/bin/docker-entrypoint.sh: line 43: 8 Aborted ( elasticsearch-keystore create )

```

Description of the Problem:

The issue does not originate from Elasticsearch itself but is linked to a Java-related problem.

Relevant bug reports have been documented:

• [JDK-8345296](https://bugs.openjdk.org/browse/JDK-8345296)

• [AWS Corretto JDK bug report](https://github.com/corretto/corretto-21/issues/85)

A known workaround involves adding the JAVA\_TOOL\_OPTIONS flag, but it appears [Elasticsearch does not recognise this JAVA\_TOOL\_OPTIONS environment variables](https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html). When I try to add it, I see the following in the elasticsearch logs:

```auto
warning: ignoring JAVA_TOOL_OPTIONS=-XX:UseSVE=0

```

Is there a confirmed workaround or solution for this issue that works effectively in this environment?

---

<div class="post-metadata">

**Author:** ![Quentin\_Pradet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quentin_pradet/32/94192_2.png) [@Quentin\_Pradet](https://discuss.elastic.co/u/Quentin_Pradet)\
**Post date:** [January 15, 2025, 6:44am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214/2 "2025-01-15T06:44:14Z")

</div>

Hello, this is indeed an Apple bug specific to M4 processors. Can you please try [this workaround](https://github.com/elastic/elasticsearch/issues/118583#issuecomment-2546897726)?

Edit: That said, I would recommend [start-local](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html) which applies the workaround automatically and makes local usage easy.

---

<div class="post-metadata">

**Author:** ![deepflyz](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@deepflyz](https://discuss.elastic.co/u/deepflyz)\
**Post date:** [January 15, 2025, 7:03am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214/3 "2025-01-15T07:03:26Z")

</div>

Hi @Quentin_Pradet,

Thank you very much for your prompt response. I tried the workaround, and it is working for me with Elasticsearch version 8.17.0.

---

<div class="post-metadata">

**Author:** ![Matthew\_Jones](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_jones/32/140812_2.png) [@Matthew\_Jones](https://discuss.elastic.co/u/Matthew_Jones)\
**Post date:** [January 21, 2025, 3:24pm UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214/4 "2025-01-21T15:24:47Z")

</div>

Hi Quentin, I tried this workaround as well. I'm in the same boat with an M4 processor and macOS 15.2, BUT with the 7.17.23 image of Elasticsearch. Are there any known workarounds short of downgrading my macOS or pushing for an org-wide Elasticsearch update?

Here is my error log:

```auto
elasticsearch-1 | #
elasticsearch-1 | # A fatal error has been detected by the Java Runtime Environment:
elasticsearch-1 | #
elasticsearch-1 | # SIGILL (0x4) at pc=0x0000ffff8013ff68, pid=26, tid=27
elasticsearch-1 | #
elasticsearch-1 | # JRE version: (22.0.2+9) (build )
elasticsearch-1 | # Java VM: OpenJDK 64-Bit Server VM (22.0.2+9-70, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
elasticsearch-1 | # Problematic frame:
elasticsearch-1 | # j java.lang.System.registerNatives()V+0 java.base@22.0.2
elasticsearch-1 | #
elasticsearch-1 | # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
elasticsearch-1 | #
elasticsearch-1 | # An error report file with more information is saved as:
elasticsearch-1 | # /tmp/hs_err_pid26.log
elasticsearch-1 | [0.009s][warning][os] Loading hsdis library failed
elasticsearch-1 | #
elasticsearch-1 | # The crash happened outside the Java Virtual Machine in native code.
elasticsearch-1 | # See problematic frame for where to report the bug.
elasticsearch-1 | #
elasticsearch-1 | /usr/share/elasticsearch/bin/elasticsearch-env: line 83: 26 Aborted "$JAVA" "$XSHARE" -cp "$ES_CLASSPATH" org.elasticsearch.tools.java_version_checker.JavaVersionChecker
elasticsearch-1 exited with code 134

```

---

<div class="post-metadata">

**Author:** ![Quentin\_Pradet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quentin_pradet/32/94192_2.png) [@Quentin\_Pradet](https://discuss.elastic.co/u/Quentin_Pradet)\
**Post date:** [January 22, 2025, 4:47am UTC](https://discuss.elastic.co/t/issue-with-elasticsearch-docker-deployment-on-apple-silicon-m4-processor-macos-15-2/373214/5 "2025-01-22T04:47:31Z")

</div>

Hi @Matthew_Jones, Elasticsearch 7.x needs a different workaround indeed, see this specific comment from the GitHub thread linked above: [macOS 15.2 M4: Unable to launch Elasticsearch Docker container · Issue #118583 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/118583#issuecomment-2567270484).
