diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java index 86187cadc63..79401b1d88f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java @@ -284,9 +284,8 @@ public class LogsCLI extends Configured implements Tool { Configuration conf, String appId) throws ClientHandlerException, UniformInterfaceException, JSONException { Client webServiceClient = Client.create(); - String webAppAddress = WebAppUtils.getHttpSchemePrefix(conf) + - WebAppUtils.getWebAppBindURL(conf, YarnConfiguration.RM_BIND_HOST, - WebAppUtils.getRMWebAppURLWithoutScheme(conf)); + String webAppAddress = WebAppUtils.getRMWebAppURLWithScheme(conf); + WebResource webResource = webServiceClient.resource(webAppAddress); ClientResponse response =