apache/hadoop · error · ReconfigurationException
For enabling or disabling storage policy satisfier, must pas
Error message
For enabling or disabling storage policy satisfier, must pass either internal/external/none string value only
What it means
reconfigureSPSModeEvent validates the new value for dfs.storage.policy.satisfier.mode before touching state: if newVal is null (property removed) or StoragePolicySatisfierMode.fromString(newVal) returns null, it throws ReconfigurationException wrapping HadoopIllegalArgumentException with this message. Only the strings 'internal', 'external' and 'none' map to enum values, so anything else - including 'true', 'on', 'off', 'disabled' - is rejected.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java:2580
rpcServer.getServiceRpcServer().setLogSlowRPCThresholdTime(logSlowRPCThresholdTime);
}
if (rpcServer.getLifelineRpcServer() != null) {
rpcServer.getLifelineRpcServer().setLogSlowRPCThresholdTime(logSlowRPCThresholdTime);
}
result = Long.toString(logSlowRPCThresholdTime);
}
LOG.info("RECONFIGURE* changed reconfigureLogSlowRPC {} to {}", property, result);
return result;
} catch (IllegalArgumentException e) {
throw new ReconfigurationException(property, newVal, getConf().get(property), e);
}
}
String reconfigureSPSModeEvent(String newVal, String property)
throws ReconfigurationException {
if (newVal == null
|| StoragePolicySatisfierMode.fromString(newVal) == null) {
throw new ReconfigurationException(property, newVal,
getConf().get(property),
new HadoopIllegalArgumentException(
"For enabling or disabling storage policy satisfier, must "
+ "pass either internal/external/none string value only"));
}
if (!isActiveState()) {
throw new ReconfigurationException(property, newVal,
getConf().get(property),
new HadoopIllegalArgumentException(
"Enabling or disabling storage policy satisfier service on "
+ state + " NameNode is not allowed"));
}
StoragePolicySatisfierMode mode = StoragePolicySatisfierMode
.fromString(newVal);
if (mode == StoragePolicySatisfierMode.NONE) {
// disabling sps service
if (namesystem.getBlockManager().getSPSManager() != null) {View on GitHub (pinned to 2add963021)
Solutions
- Set exactly one of the three modes: `-set dfs.storage.policy.satisfier.mode=external`
- To disable SPS use 'none', not false/off/disabled
- Check the currently configured mode first (`-reconfig namenode <addr> -properties` or hdfs-site.xml)
- Remember the reconfig must target the ACTIVE NameNode - a separate state check (error 2968) rejects standbys
Example fix
# before hdfs dfsadmin -reconfig namenode nn1:8020 -set dfs.storage.policy.satisfier.mode=true # after - valid enum values only hdfs dfsadmin -reconfig namenode nn1:8020 -set dfs.storage.policy.satisfier.mode=external
Defensive patterns
Strategy: validation
Validate before calling
case "${MODE,,}" in internal|external|none) ;; *) echo "mode must be internal|external|none"; exit 1;; esac
hdfs dfsadmin -reconfig namenode nn1:8020 -set dfs.storage.policy.satisfier.mode=$MODE Type guard
static boolean isValidSpsMode(String s) {
return StoragePolicySatisfierMode.fromString(s) != null; // internal|external|none
} Try / catch
catch (ReconfigurationException e) {
if (e.getCause() instanceof HadoopIllegalArgumentException) {
// invalid SPS mode string - surface allowed values internal/external/none
}
} Prevention
- Treat dfs.storage.policy.satisfier.mode as an enum, never a boolean
- Build the value with a case statement in automation so only the three literals can ship
- Remember 'none' is the off state
When it happens
Trigger: `hdfs dfsadmin -reconfig namenode <addr> -set dfs.storage.policy.satisfier.mode=<not internal/external/none>` - e.g. 'true', 'ON', an empty value, or removing the property (null).
Common situations: Operators try to toggle SPS like a boolean ('true'/'false') instead of selecting a mode; typos like 'externel'; attempting to clear the property to disable rather than setting 'none'.
Related errors
- Enabling or disabling storage policy satisfier service on {s
- Could not change property {property} from '{oldVal}' to '{ne
- Could not change property {} from '{}' to '{}'
- {} is not boolean value
- Cannot request to satisfy storage policy when storage policy
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/e0e4b727e2328092.
Report an issue: GitHub.