diff --git a/server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java b/server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java index 3bc29da40f4..d681004326c 100644 --- a/server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java +++ b/server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java @@ -264,7 +264,11 @@ public class DruidLeaderClient ); if (leader == null) { - throw new IOE("No known server"); + throw new IOE( + "A leader node could not be found for [%s] service. " + + "Check logs of service [%s] to confirm it is healthy.", + nodeRoleToWatch, nodeRoleToWatch + ); } else { return leader; } diff --git a/server/src/test/java/org/apache/druid/discovery/DruidLeaderClientTest.java b/server/src/test/java/org/apache/druid/discovery/DruidLeaderClientTest.java index 6b8f32ba190..cff1aeb9fb0 100644 --- a/server/src/test/java/org/apache/druid/discovery/DruidLeaderClientTest.java +++ b/server/src/test/java/org/apache/druid/discovery/DruidLeaderClientTest.java @@ -159,7 +159,9 @@ public class DruidLeaderClientTest extends BaseJettyTest druidLeaderClient.start(); expectedException.expect(IOException.class); - expectedException.expectMessage("No known server"); + expectedException.expectMessage( + "A leader node could not be found for [PEON] service. " + + "Check logs of service [PEON] to confirm it is healthy."); druidLeaderClient.makeRequest(HttpMethod.POST, "/simple/direct"); }