{"record":{"id":"c318f0e86db6c9f2","repo":"apache/hadoop","slug":"no-namenodes-available-under-nameservice","errorCode":null,"errorMessage":"No namenodes available under nameservice {}","messagePattern":"No namenodes available under nameservice (.+?)","errorType":"exception","errorClass":"NoNamenodesAvailableException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java","lineNumber":488,"sourceCode":"   * @param ioe IOException reported.\n   * @param retryCount Number of retries.\n   * @param nsId Nameservice ID.\n   * @param namenode namenode context.\n   * @param listObserverFirst Observer read case, observer NN will be ranked first.\n   * @return Retry decision.\n   * @throws IOException An IO Error occurred.\n   */\n  protected RetryDecision shouldRetry(\n      final IOException ioe, final int retryCount, final String nsId,\n      final FederationNamenodeContext namenode,\n      final boolean listObserverFirst) throws IOException {\n    // check for the case of cluster unavailable state\n    if (isClusterUnAvailable(nsId, namenode, listObserverFirst)) {\n      // we allow to retry once if cluster is unavailable\n      if (retryCount == 0) {\n        return RetryDecision.RETRY;\n      } else {\n        throw new NoNamenodesAvailableException(nsId, ioe);\n      }\n    }\n\n    try {\n      final RetryPolicy.RetryAction a =\n          this.retryPolicy.shouldRetry(ioe, retryCount, 0, true);\n      return a.action;\n    } catch (Exception ex) {\n      LOG.error(\"Re-throwing API exception, no more retries\", ex);\n      throw toIOException(ex);\n    }\n  }\n\n  /**\n   * Invokes a method against the ClientProtocol proxy server. If a standby\n   * exception is generated by the call to the client, retries using the\n   * alternate server.\n   * <p>","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java#L470-L506","documentation":"Error \"No namenodes available under nameservice {}\" thrown in apache/hadoop.","triggerScenarios":"The namenode resolver returned an empty list of active namenodes for the requested nameservice.","commonSituations":"All namenodes of a subcluster are down/unregistered, in safe mode/standby-only, or the nameservice was disabled in the State Store.","solutions":["Check that namenodes for the nameservice have registered with the State Store (Router admin: dfsrouteradmin -ls <nsId>).","Verify the namenode heartbeats are reaching the Router and the registrations are not expired/disabled.","Confirm dfs.federation.router.nameservices / resolver configuration includes the nameservice."],"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-22T20:17:22.307Z"}