apache/hadoop · error · StateStoreUnavailableException
Mount Table not initialized
Error message
Mount Table not initialized
What it means
MountTableResolver.verifyMountTable() guards every mount table query (getMounts, getMountPoint, etc.) and throws StateStoreUnavailableException('Mount Table not initialized') when this.init is false or the resolver is disabled. That state means the mount table cache has not been loaded from the state store yet — typically the router just started and the first cache refresh has not run, or initialization failed because the state store is unreachable.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MountTableResolver.java:562
/**
* Get all the mount records at or beneath a given path.
* @param path Path to get the mount points from.
* @return List of mount table records under the path or null if the path is
* not found.
* @throws IOException If it's not connected to the State Store.
*/
public List<MountTable> getMounts(final String path) throws IOException {
verifyMountTable();
return getTreeValues(RouterAdmin.normalizeFileSystemPath(path), false);
}
/**
* Check if the Mount Table is ready to be used.
* @throws StateStoreUnavailableException If it cannot connect to the store.
*/
private void verifyMountTable() throws StateStoreUnavailableException {
if (!this.init || disabled) {
throw new StateStoreUnavailableException("Mount Table not initialized");
}
}
@Override
public String toString() {
readLock.lock();
try {
return this.tree.toString();
} finally {
readLock.unlock();
}
}
/**
* Build a location for this result beneath the discovered mount point.
*
* @param path Path to build for.
* @param entry Mount table entry.View on GitHub (pinned to 2add963021)
Solutions
- Check router state (hdfs dfsrouteradmin -status or the router UI) and let it leave SAFEMODE once caches load; then retry the request
- Verify state store connectivity (ZooKeeper/DB) from the router host and look for StateStoreService errors in the logs
- Fix the state store first if it is down — the mount table initializes on the next successful refresh
- For programmatic use, call resolver.loadCache(true) or wait for initialization before querying
Defensive patterns
Strategy: retry
Try / catch
// Tooling/client: wait out the router's cache initialization with backoff
for (int i = 0; i < 10; i++) {
try {
return resolver.getMounts(path);
} catch (StateStoreUnavailableException e) {
Thread.sleep(1_000L << Math.min(i, 4)); // 1s,2s,4s... capped
}
}
throw new IOException("mount table still uninitialized after retries"); Prevention
- Health-check routers (state ACTIVE, out of SAFEMODE) before routing traffic to them
- Monitor state store availability and alert on prolonged SAFEMODE
- In tools, trigger/await resolver cache load before the first query
- Stagger router restarts so some routers stay ACTIVE for client retries
When it happens
Trigger: Any RPC hitting the router in the window between service start and the first successful mount table cache load; the state store (ZooKeeper/DB) going down so the resolver disabled itself; programmatic use of MountTableResolver without triggering loadCache/refresh first.
Common situations: Router restarts under load where clients reconnect faster than caches initialize; state store outages; routers parked in SAFEMODE; tools constructing the resolver directly against a state store.
Related errors
- Mount table state store is not available.
- Configured handlers dfs.federation.router.handler.count= %d
- State Store does not have an interface for {}
- No namespace availaible.
- Wrong name service specified : {}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/1da619a352828214.
Report an issue: GitHub.