{"record":{"id":"00f53703b72c7330","repo":"apache/hadoop","slug":"mount-table-state-store-is-not-available-00f537","errorCode":null,"errorMessage":"Mount table state store is not available.","messagePattern":"Mount table state store is not available\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java","lineNumber":250,"sourceCode":"    superGroup = routerConf.get(\n        DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_KEY,\n        DFSConfigKeys.DFS_PERMISSIONS_SUPERUSERGROUP_DEFAULT);\n    isPermissionEnabled = routerConf.getBoolean(DFS_PERMISSIONS_ENABLED_KEY,\n        DFS_PERMISSIONS_ENABLED_DEFAULT);\n  }\n\n  /** Allow access to the client RPC server for testing. */\n  @VisibleForTesting\n  Server getAdminServer() {\n    return this.adminServer;\n  }\n\n  private MountTableStore getMountTableStore() throws IOException {\n    if (this.mountTableStore == null) {\n      this.mountTableStore = router.getStateStore().getRegisteredRecordStore(\n          MountTableStore.class);\n      if (this.mountTableStore == null) {\n        throw new IOException(\"Mount table state store is not available.\");\n      }\n    }\n    return this.mountTableStore;\n  }\n\n  private DisabledNameserviceStore getDisabledNameserviceStore()\n      throws IOException {\n    if (this.disabledStore == null) {\n      this.disabledStore = router.getStateStore().getRegisteredRecordStore(\n          DisabledNameserviceStore.class);\n      if (this.disabledStore == null) {\n        throw new IOException(\n            \"Disabled Nameservice state store is not available.\");\n      }\n    }\n    return this.disabledStore;\n  }\n","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java#L232-L268","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"<!-- router config: state store backed by ZooKeeper -->\n<property>\n  <name>dfs.federation.router.store.enable</name>\n  <value>true</value>\n</property>\n<property>\n  <name>dfs.federation.router.store.driver.class</name>\n  <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreZKImpl</value>\n</property>\n<property>\n  <name>dfs.federation.router.store.serializer</name>\n  <value>org.apache.hadoop.hdfs.server.federation.store.driver.impl.StateStoreSerializerPBImpl</value>\n</property>","handlingStrategy":"retry","validationCode":"// Before dsadmin mount ops, confirm the mount table store is reachable\nStateStoreService ss = router.getStateStore();\nif (ss == null || ss.getRegisteredRecordStore(MountTableStore.class) == null) {\n  throw new IllegalStateException(\"State Store not ready; check backend connectivity\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  routerAdmin.addMountTableEntry(request);\n} catch (IOException e) {\n  if (\"Mount table state store is not available.\".equals(e.getMessage())) {\n    // state store down/uninitialized: fix backend (ZK/DB), wait for init, retry once healthy\n  } else { throw e; }\n}","preventionTips":["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"],"tags":["hdfs","router-based-federation","state-store","mount-table","configuration","admin"],"backgroundTag":"dependency-unavailable","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}