# Why does Elasticsearch 8.19.23 require jdk.attach, jdk.jlink and jdk.jdi?

**URL:** <https://discuss.elastic.co/t/why-does-elasticsearch-8-19-23-require-jdk-attach-jdk-jlink-and-jdk-jdi/392224>\
**Category:** Elasticsearch\
**Tags:** runtime-fields\
**Created:** [December 3, 2026, 9:22am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-8-19-23-require-jdk-attach-jdk-jlink-and-jdk-jdi/392224 "2026-12-03T09:22:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Rana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_rana/32/42952_2.png) [@Prashant\_Rana](https://discuss.elastic.co/u/Prashant_Rana)\
**Post date:** [December 3, 2026, 9:22am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-8-19-23-require-jdk-attach-jdk-jlink-and-jdk-jdi/392224/1 "2026-12-03T09:22:26Z")

</div>

Hi Elastic team,

We are integrating Elasticsearch 8.19.23 into our product which ships with Azul Zulu JRE 17.0.21.1.

During startup, Elasticsearch fails with:

```auto
Error occurred during initialization of boot layer
java.lang.module.FindException:
Module jdk.attach not found, required by org.elasticsearch.entitlement

```

On inspecting `elasticsearch-entitlement-8.19.23.jar`, we found the following module requirements in its `module-info`:

```auto
requires jdk.attach;
requires jdk.jlink;
requires jdk.jdi;

```

We understand why `jdk.attach` is required. The Entitlements implementation uses the Attach API to load its instrumentation agent, which instruments sensitive JDK methods and enforces entitlement checks.

However, we would like to understand the rationale behind the other two dependencies.

1. **jdk.jdi:** What functionality in Elasticsearch Entitlements requires the Java Debug Interface? Is it needed during normal Elasticsearch runtime, or only for debugging or development?

2. **jdk.jlink:** Why does the Entitlements module require the Java runtime image builder? Is it used at runtime, or is this dependency only required during the build or packaging process?

3. Are these two modules genuinely required in the production runtime, or could their module requirements be changed to optional (`requires static`) or otherwise removed?

Our objective is to ship a minimal Java runtime rather than the full JDK, without modifying Elasticsearch functionality or compromising its security enforcement.

Could someone from the Elasticsearch Core/Infra team clarify the purpose of these dependencies and whether all three modules are mandatory at runtime?

We would appreciate any pointers to the relevant source code or implementation details.

Thanks!

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 3, 2026, 10:39am UTC](https://discuss.elastic.co/t/why-does-elasticsearch-8-19-23-require-jdk-attach-jdk-jlink-and-jdk-jdi/392224/2 "2026-12-03T10:39:43Z")

</div>

> [@Prashant\_Rana](#):
>
> Could someone from the Elasticsearch Core/Infra team clarify the purpose of these dependencies and whether all three modules are mandatory at runtime?

I do not see an obvious reason for those dependencies in this specific version, although they were needed in older versions and I can imagine reasons for them being needed in future. This is not a confirmation that those modules are not mandatory, just an observation that I can't see an obvious reason for them. You should not expect any stronger statement, however, because of the following concerns.

> [@Prashant\_Rana](#):
>
> Our objective is to ship a minimal Java runtime rather than the full JDK

This is a very very bad idea. See e.g. [these docs](https://www.elastic.co/docs/deploy-manage/deploy/self-managed/installing-elasticsearch#jvm-version):

> Elasticsearch is built using Java, and includes a bundled version of [OpenJDK](https://openjdk.java.net/) within each distribution. **We strongly recommend using the bundled JVM in all installations of Elasticsearch.**

Even if it seems to work with the chosen version, you will almost certainly encounter situations where you cannot perform an upgrade because of your choice of custom runtime. Some upgrades can be necessary at very short notice because of security vulnerabilities.

In addition the 8.x series becomes [unmaintained in mid January 2027](https://www.elastic.co/support/eol), less than two months away, so it would be fairly irresponsible to start building it into a product at this point in time.
