apache/hadoop · error · IOException

Registration rejected by {nnRpcAddress}. Shutting down.

Error message

Registration rejected by {nnRpcAddress}. Shutting down.

What it means

Error "Registration rejected by {nnRpcAddress}. Shutting down." thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java:407

        LOG.info("Problem connecting to name-node: " + nnRpcAddress);
        try {
          Thread.sleep(1000);
        } catch (InterruptedException ie) {
          LOG.warn("Encountered exception ", e);
        }
      }
    }

    String msg = null;
    if(nnReg == null) // consider as a rejection
      msg = "Registration rejected by " + nnRpcAddress;
    else if(!nnReg.isRole(NamenodeRole.NAMENODE)) {
      msg = "Name-node " + nnRpcAddress + " is not active";
    }
    if(msg != null) {
      msg += ". Shutting down.";
      LOG.error(msg);
      throw new IOException(msg); // stop the node
    }
    nnRpcAddress = nnReg.getAddress();
  }

  // TODO: move to a common with DataNode util class
  private static NamespaceInfo handshake(NamenodeProtocol namenode)
  throws IOException, SocketTimeoutException {
    NamespaceInfo nsInfo;
    nsInfo = namenode.versionRequest();  // throws SocketTimeoutException 
    String errorMsg = null;
    // verify build version
    if( ! nsInfo.getBuildVersion().equals( Storage.getBuildVersion())) {
      errorMsg = "Incompatible build versions: active name-node BV = " 
        + nsInfo.getBuildVersion() + "; backup node BV = "
        + Storage.getBuildVersion();
      LOG.error(errorMsg);
      throw new IOException(errorMsg);
    }

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the active NameNode log for why the BackupNode registration was rejected (namespace ID mismatch, version mismatch, not allowed).
  2. Reformat or re-bootstrap the BackupNode storage with 'hdfs namenode -bootstrapStandby' so its namespace matches the active NameNode.

When it happens

Trigger: BackupNode startup when the active NameNode rejects its registration, e.g. namespace/cluster id mismatch.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/93201bf0bd0425ef. Report an issue: GitHub.