{"record":{"id":"93201bf0bd0425ef","repo":"apache/hadoop","slug":"registration-rejected-by-nnrpcaddress-shutting","errorCode":null,"errorMessage":"Registration rejected by {nnRpcAddress}. Shutting down.","messagePattern":"Registration rejected by (.+?)\\. Shutting down\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java","lineNumber":407,"sourceCode":"        LOG.info(\"Problem connecting to name-node: \" + nnRpcAddress);\n        try {\n          Thread.sleep(1000);\n        } catch (InterruptedException ie) {\n          LOG.warn(\"Encountered exception \", e);\n        }\n      }\n    }\n\n    String msg = null;\n    if(nnReg == null) // consider as a rejection\n      msg = \"Registration rejected by \" + nnRpcAddress;\n    else if(!nnReg.isRole(NamenodeRole.NAMENODE)) {\n      msg = \"Name-node \" + nnRpcAddress + \" is not active\";\n    }\n    if(msg != null) {\n      msg += \". Shutting down.\";\n      LOG.error(msg);\n      throw new IOException(msg); // stop the node\n    }\n    nnRpcAddress = nnReg.getAddress();\n  }\n\n  // TODO: move to a common with DataNode util class\n  private static NamespaceInfo handshake(NamenodeProtocol namenode)\n  throws IOException, SocketTimeoutException {\n    NamespaceInfo nsInfo;\n    nsInfo = namenode.versionRequest();  // throws SocketTimeoutException \n    String errorMsg = null;\n    // verify build version\n    if( ! nsInfo.getBuildVersion().equals( Storage.getBuildVersion())) {\n      errorMsg = \"Incompatible build versions: active name-node BV = \" \n        + nsInfo.getBuildVersion() + \"; backup node BV = \"\n        + Storage.getBuildVersion();\n      LOG.error(errorMsg);\n      throw new IOException(errorMsg);\n    }","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java#L389-L425","documentation":"Error \"Registration rejected by {nnRpcAddress}. Shutting down.\" thrown in apache/hadoop.","triggerScenarios":"BackupNode startup when the active NameNode rejects its registration, e.g. namespace/cluster id mismatch.","commonSituations":"See trigger scenarios.","solutions":["Check the active NameNode log for why the BackupNode registration was rejected (namespace ID mismatch, version mismatch, not allowed).","Reformat or re-bootstrap the BackupNode storage with 'hdfs namenode -bootstrapStandby' so its namespace matches the active NameNode."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}