From 01de8528237b75d2b373229fcef98c168fd79f40 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 be9e8254f464c..928b953c295fe 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 @@ static void loadAgent(String agentPath, String entitlementInitializationClassNam 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); } }