apache/hadoop · error · IOException
Mount table state store is not available.
Error message
Mount table state store is not available.
What it means
RouterAdminServer.getMountTableStore() lazily fetches the MountTableStore record store from the State Store and throws IOException when it is not registered. Record stores register when the State Store driver initializes and MountTableStoreImpl registers itself; failure means the State Store is unreachable/misconfigured or was never started (dfs.federation.router.store.enable), so mount table admin operations (add/update/remove entry) cannot proceed.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java:250
superGroup = routerConf.get(
DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY,
DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_DEFAULT);
isPermissionEnabled = routerConf.getBoolean(DFS_PERMISSIONS_ENABLED_KEY,
DFS_PERMISSIONS_ENABLED_DEFAULT);
}
/** Allow access to the client RPC server for testing. */
@VisibleForTesting
Server getAdminServer() {
return this.adminServer;
}
private MountTableStore getMountTableStore() throws IOException {
if (this.mountTableStore == null) {
this.mountTableStore = router.getStateStore().getRegisteredRecordStore(
MountTableStore.class);
if (this.mountTableStore == null) {
throw new IOException("Mount table state store is not available.");
}
}
return this.mountTableStore;
}
private DisabledNameserviceStore getDisabledNameserviceStore()
throws IOException {
if (this.disabledStore == null) {
this.disabledStore = router.getStateStore().getRegisteredRecordStore(
DisabledNameserviceStore.class);
if (this.disabledStore == null) {
throw new IOException(
"Disabled Nameservice state store is not available.");
}
}
return this.disabledStore;
}
View on GitHub (pinned to 2add963021)
Solutions
- Check Router logs for StateStoreService errors and verify backend connectivity (ZK quorum, DB up, LDAP reachable)
- Set dfs.federation.router.store.enable=true and configure dfs.federation.router.store.driver.class + driver-specific properties, then restart the Router
- For DB-backed stores, run schema init/migration so record tables exist
- Retry the admin command after the state store reports 'initialized' in the log
Example fix
<!-- router config: state store backed by ZooKeeper --> <property> <name>dfs.federation.router.store.enable</name> <value>true</value> </property> <property> <name>dfs.federation.router.store.driver.class</name> <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZKImpl</value> </property> <property> <name>dfs.federation.router.store.serializer</name> <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreSerializerPBImpl</value> </property>
Defensive patterns
Strategy: retry
Validate before calling
// Before dsadmin mount ops, confirm the mount table store is reachable
StateStoreService ss = router.getStateStore();
if (ss == null || ss.getRegisteredRecordStore(MountTableStore.class) == null) {
throw new IllegalStateException("State Store not ready; check backend connectivity");
} Try / catch
try {
routerAdmin.addMountTableEntry(request);
} catch (IOException e) {
if ("Mount table state store is not available.".equals(e.getMessage())) {
// state store down/uninitialized: fix backend (ZK/DB), wait for init, retry once healthy
} else { throw e; }
} Prevention
- Monitor the State Store backend availability as part of Router health checks
- Keep dfs.federation.router.store.enable=true and a valid driver class in router config
- Initialize DB schemas before first use
When it happens
Trigger: hdfs dsadmin -addMount/-updateMount/-rmMount while the state store backend (ZK/MySQL/LDAP...) is down; router.xml missing state store driver config so StateStoreService has no registered stores; calling admin ops during Router startup before the state store service initializes; dfs.federation.router.store.enable=false on the admin-serving Router.
Common situations: ZooKeeper ensemble unreachable or auth failure (SASL creds expired); state store driver class mistyped (dfs.federation.router.store.driver.class); schema/table missing in the DB backend after a fresh install; Router restarted while the state store JVM is still coming up.
Related errors
- Disabled Nameservice state store is not available.
- File not found in downstream nameservices: {}
- State Store does not have an interface for {}
- Cannot serialize field {} into JSON
- The quota system is disabled in Router.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/00f53703b72c7330.
Report an issue: GitHub.