diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java index a7d2fe8e5a7..05745ec272e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java @@ -1273,8 +1273,6 @@ public class ResourceManager extends CompositeService implements Recoverable { protected void serviceStart() throws Exception { if (this.rmContext.isHAEnabled()) { transitionToStandby(false); - } else { - transitionToActive(); } startWepApp(); @@ -1284,6 +1282,11 @@ public class ResourceManager extends CompositeService implements Recoverable { WebAppUtils.setRMWebAppPort(conf, port); } super.serviceStart(); + + // Non HA case, start after RM services are started. + if (!this.rmContext.isHAEnabled()) { + transitionToActive(); + } } protected void doSecureLogin() throws IOException {