apache/hadoop · error · NoNamenodesAvailableException
No namenodes available under nameservice {}
Error message
No namenodes available under nameservice {} What it means
Error "No namenodes available under nameservice {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java:488
* @param ioe IOException reported.
* @param retryCount Number of retries.
* @param nsId Nameservice ID.
* @param namenode namenode context.
* @param listObserverFirst Observer read case, observer NN will be ranked first.
* @return Retry decision.
* @throws IOException An IO Error occurred.
*/
protected RetryDecision shouldRetry(
final IOException ioe, final int retryCount, final String nsId,
final FederationNamenodeContext namenode,
final boolean listObserverFirst) throws IOException {
// check for the case of cluster unavailable state
if (isClusterUnAvailable(nsId, namenode, listObserverFirst)) {
// we allow to retry once if cluster is unavailable
if (retryCount == 0) {
return RetryDecision.RETRY;
} else {
throw new NoNamenodesAvailableException(nsId, ioe);
}
}
try {
final RetryPolicy.RetryAction a =
this.retryPolicy.shouldRetry(ioe, retryCount, 0, true);
return a.action;
} catch (Exception ex) {
LOG.error("Re-throwing API exception, no more retries", ex);
throw toIOException(ex);
}
}
/**
* Invokes a method against the ClientProtocol proxy server. If a standby
* exception is generated by the call to the client, retries using the
* alternate server.
* <p>View on GitHub (pinned to 2add963021)
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.
When it happens
Trigger: The namenode resolver returned an empty list of active namenodes for the requested nameservice.
Common situations: All namenodes of a subcluster are down/unregistered, in safe mode/standby-only, or the nameservice was disabled in the State Store.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c318f0e86db6c9f2.
Report an issue: GitHub.