diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/InitDatanodeState.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/InitDatanodeState.java index f04d392532..b348327973 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/InitDatanodeState.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/InitDatanodeState.java @@ -92,6 +92,16 @@ public class InitDatanodeState implements DatanodeState, LOG.error("Null or empty SCM address list found."); return DatanodeStateMachine.DatanodeStates.SHUTDOWN; } else { + for (InetSocketAddress addr : addresses) { + if (addr.isUnresolved()) { + LOG.warn("One SCM address ({}) can't (yet?) be resolved. Postpone " + + "initialization.", addr); + + //skip any further initialization. DatanodeStateMachine will try it + // again after the hb frequency + return this.context.getState(); + } + } for (InetSocketAddress addr : addresses) { connectionManager.addSCMServer(addr); }