# ES 8.19.5 encountered a NotEntitledException when attach to the ES process using Arthas

**URL:** <https://discuss.elastic.co/t/es-8-19-5-encountered-a-notentitledexception-when-attach-to-the-es-process-using-arthas/382742>\
**Category:** Elasticsearch\
**Created:** [October 15, 2025, 12:03pm UTC](https://discuss.elastic.co/t/es-8-19-5-encountered-a-notentitledexception-when-attach-to-the-es-process-using-arthas/382742 "2025-10-15T12:03:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZLEternity](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zleternity/32/111443_2.png) [@ZLEternity](https://discuss.elastic.co/u/ZLEternity)\
**Post date:** [October 15, 2025, 12:03pm UTC](https://discuss.elastic.co/t/es-8-19-5-encountered-a-notentitledexception-when-attach-to-the-es-process-using-arthas/382742/1 "2025-10-15T12:03:12Z")

</div>

elasticsearch8.19.5 use Entitlements module，Arthas fails to attach.

**Entitlement Policy Configuration (`arthas-entitlement-policy.yaml`):**

```auto
versions:
  8.19.5
policy:
  ALL-UNNAMED:
    file:
      read:
        paths:
          - /usr/share/elasticsearch/logs/arthas
          - /usr/share/elasticsearch/logs/arthas/**  
          - /usr/share/elasticsearch/.arthas/**      
          - /usr/share/elasticsearch/.arthas
          - /usr/share/elasticsearch/.arthas/arthas-core.jar

```

**Startup Command:**  
Elasticsearch was launched with the parameter:  
`-Des.entitlements.policy.arthas=/usr/share/elasticsearch/config/arthas-entitlement-policy.yaml`

**Error Message:**  
`Not entitled: component [(unknown)], module [ALL-UNNAMED], class [class com.taobao.arthas.agent334.AgentBootstrap], entitlement [file], operation [read], path [/usr/share/elasticsearch/.arthas/arthas-core.jar]`

How can I resolve this issue? ～～～

Or is it possible to disable Entitlements detection? I tried `-Des.entitlements.enabled=false` but it didn't work.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [October 15, 2025, 11:31pm UTC](https://discuss.elastic.co/t/es-8-19-5-encountered-a-notentitledexception-when-attach-to-the-es-process-using-arthas/382742/2 "2025-10-15T23:31:29Z")

</div>

We don't support attaching agents to Elasticsearch.

My guess is that you won't be able to get this to work without modifying Elasticsearch itself.

Note the [warning here](https://www.elastic.co/docs/deploy-manage/deploy/self-managed/installing-elasticsearch#jvm-version):

> Don’t use third-party Java agents that attach to the JVM. Such agents can be harmful to Elasticsearch stability and performance. In some cases they may cause nodes to freeze, crash, or fail to start up, or to lose or corrupt your data.
