From 5dcded20a95f1b26d7129de09479b3afe42bb11b Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 27 Jun 2025 11:00:18 -0700 Subject: [PATCH] Show entitlement jar path in agent load failure (#130233) When the entitelement agent fails to load the underlying exception can be cryptic. In some casees it may be that the path the agent jar is bad. This commit expands the exception message to show the agent path that we tried to load. --- .../entitlement/bootstrap/EntitlementBootstrap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java b/libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java index be9e8254f464..928b953c295f 100644 --- a/libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java +++ b/libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java @@ -122,7 +122,7 @@ public class EntitlementBootstrap { vm.detach(); } } catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) { - throw new IllegalStateException("Unable to attach entitlement agent", e); + throw new IllegalStateException("Unable to attach entitlement agent [" + agentPath + "]", e); } }