apache/hadoop · critical · IOException
Cannot find namenode resolver.
Error message
Cannot find namenode resolver.
What it means
During Router.init(), FederationUtil.newActiveNamenodeResolver() reflectively instantiates the class in dfs.federation.router.namenode.resolver.client.class (default MembershipNamenodeResolver). If instantiation throws ReflectiveOperationException (class missing, wrong constructor signature, constructor failure) the helper returns null and Router throws IOException('Cannot find namenode resolver.') at startup. The real cause is logged just above as 'Could not instantiate: <class>'.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Router.java:181
// Enable the security for the Router
UserGroupInformation.setConfiguration(conf);
SecurityUtil.login(conf, DFS_ROUTER_KEYTAB_FILE_KEY,
DFS_ROUTER_KERBEROS_PRINCIPAL_KEY, getHostName(conf));
if (conf.getBoolean(
RBFConfigKeys.DFS_ROUTER_STORE_ENABLE,
RBFConfigKeys.DFS_ROUTER_STORE_ENABLE_DEFAULT)) {
// Service that maintains the State Store connection
this.stateStore = new StateStoreService();
addService(this.stateStore);
}
// Resolver to track active NNs
this.namenodeResolver = newActiveNamenodeResolver(
this.conf, this.stateStore);
if (this.namenodeResolver == null) {
throw new IOException("Cannot find namenode resolver.");
}
// Lookup interface to map between the global and subcluster name spaces
this.subclusterResolver = newFileSubclusterResolver(this.conf, this);
if (this.subclusterResolver == null) {
throw new IOException("Cannot find subcluster resolver");
}
if (conf.getBoolean(
RBFConfigKeys.DFS_ROUTER_RPC_ENABLE,
RBFConfigKeys.DFS_ROUTER_RPC_ENABLE_DEFAULT)) {
// Create RPC server
this.rpcServer = createRpcServer();
addService(this.rpcServer);
this.setRpcServerAddress(rpcServer.getRpcAddress());
}
checkRouterId();View on GitHub (pinned to 2add963021)
Solutions
- Check the Router log for 'Could not instantiate: <resolver>' with the underlying ReflectiveOperationException stack
- Fix the key dfs.federation.router.namenode.resolver.client.class to a class on the classpath implementing ActiveNamenodeResolver with a (Configuration, StateStoreService) constructor, or remove the key to use the default MembershipNamenodeResolver
- Ship the plugin jar to the Router's classpath (lib/ or static service loading) on every Router host and restart
Example fix
<!-- before: class not found / wrong signature -->
<property>
<name>dfs.federation.router.namenode.resolver.client.class</name>
<value>com.myco.resolver.MyResolver</value>
</property>
<!-- after: fall back to default or fix the impl -->
<!-- remove the property to use MembershipNamenodeResolver, or fix MyResolver to expose
MyResolver(Configuration conf, StateStoreService stateStore) --> Defensive patterns
Strategy: validation
Validate before calling
// Smoke-test resolver instantiation before Router init in a launcher
String cls = conf.get("dfs.federation.router.namenode.resolver.client.class",
"org.apache.hadoop.hdfs.server.federation.resolver.MembershipNamenodeResolver");
Class<?> c = Class.forName(cls); // fails fast with real cause
if (!org.apache.hadoop.hdfs.server.federation.resolver.ActiveNamenodeResolver.class.isAssignableFrom(c)) {
throw new IllegalArgumentException(cls + " does not implement ActiveNamenodeResolver");
} Try / catch
try {
router.init(conf);
} catch (IOException e) {
if ("Cannot find namenode resolver.".equals(e.getMessage())) {
// look for 'Could not instantiate' in the log; fix classpath/config for
// dfs.federation.router.namenode.resolver.client.class, then restart
} else { throw e; }
} Prevention
- Keep resolver class names in config fully qualified and verify the jar exists on all Router hosts
- Custom resolvers must expose a (Configuration, StateStoreService) constructor
- Add a startup preflight that Class.forName()s configured plugin classes
When it happens
Trigger: Setting dfs.federation.router.namenode.resolver.client.class to a class not on the Router classpath, not implementing ActiveNamenodeResolver, or lacking a (Configuration, StateStoreService) constructor; a custom resolver whose constructor throws; dependency shading trimming the resolver class.
Common situations: Deploying a custom State Store/resolver plugin jar to only some Routers; typo in the class name in the config; version upgrades that moved/renamed resolver classes; test configurations pointing at a mock class not packaged.
Related errors
- Cannot find subcluster resolver
- Unknown nameservice: {}
- Configuration has multiple addresses that match local node's
- Configuration dfs.namenode.rpc-address must be suffixed with
- Journal dir '{}' should be an absolute path
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/453ff516fe0763af.
Report an issue: GitHub.