{"record":{"id":"daf4ffd4f91d0e6f","repo":"apache/hadoop","slug":"invalid-value-configured-for-dfs-datanode-disk-che","errorCode":null,"errorMessage":"Invalid value configured for dfs.datanode.disk.check.timeout - {} (should be > 0)","messagePattern":"Invalid value configured for dfs\\.datanode\\.disk\\.check\\.timeout - (.+?) \\(should be > 0\\)","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/DatasetVolumeChecker.java","lineNumber":124,"sourceCode":"\n  private static final VolumeCheckContext IGNORED_CONTEXT =\n      new VolumeCheckContext();\n\n  private final ExecutorService checkVolumeResultHandlerExecutorService;\n\n  /**\n   * @param conf Configuration object.\n   * @param timer {@link Timer} object used for throttling checks.\n   */\n  public DatasetVolumeChecker(Configuration conf, Timer timer)\n      throws DiskErrorException {\n    maxAllowedTimeForCheckMs = conf.getTimeDuration(\n        DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY,\n        DFS_DATANODE_DISK_CHECK_TIMEOUT_DEFAULT,\n        TimeUnit.MILLISECONDS);\n\n    if (maxAllowedTimeForCheckMs <= 0) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY + \" - \"\n          + maxAllowedTimeForCheckMs + \" (should be > 0)\");\n    }\n\n    this.timer = timer;\n\n    maxVolumeFailuresTolerated = conf.getInt(\n        DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY,\n        DFS_DATANODE_FAILED_VOLUMES_TOLERATED_DEFAULT);\n\n    minDiskCheckGapMs = conf.getTimeDuration(\n        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY,\n        DFSConfigKeys.DFS_DATANODE_DISK_CHECK_MIN_GAP_DEFAULT,\n        TimeUnit.MILLISECONDS);\n\n    if (minDiskCheckGapMs < 0) {\n      throw new HadoopIllegalArgumentException(\"Invalid value configured for \"\n          + DFS_DATANODE_DISK_CHECK_MIN_GAP_KEY + \" - \"","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/DatasetVolumeChecker.java#L106-L142","documentation":"DatasetVolumeChecker's constructor reads dfs.datanode.disk.check.timeout (default 10 minutes) as the max wall time a volume health check may take before the volume is declared dead. The first validation requires it to be strictly greater than 0; a zero or negative duration (e.g. '0s', '-1ms') aborts DataNode startup with HadoopIllegalArgumentException.","triggerScenarios":"Setting dfs.datanode.disk.check.timeout=0 (or negative) in hdfs-site.xml - often done intending to 'disable' the timeout, which is not allowed; also bad duration syntax resolving to 0, or a units mistake like '0ms' meaning 'no timeout' in another system's semantics.","commonSituations":"Admins porting '0 disables it' conventions from other timeouts (e.g., dfs.datanode.socket.write.timeout=0 means no timeout there) to this key; templated configs injecting 0; regression after upgrading to Hadoop 3.x where DatasetVolumeChecker validation was added.","solutions":["Set a positive duration, e.g. dfs.datanode.disk.check.timeout=10m (the default)","To make checks fast rather than disabled, use a small positive value plus dfs.datanode.disk.check.min.gap to throttle","Restart the DataNode; the fail-fast check runs at construction, before any volume is touched"],"exampleFix":"# before (hdfs-site.xml)\n<property><name>dfs.datanode.disk.check.timeout</name><value>0</value></property>\n\n# after\n<property><name>dfs.datanode.disk.check.timeout</name><value>10m</value></property>","handlingStrategy":"validation","validationCode":"import org.apache.hadoop.conf.Configuration;\nimport org.apache.hadoop.hdfs.DFSConfigKeys;\nimport java.util.concurrent.TimeUnit;\nlong t = conf.getTimeDuration(DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_KEY,\n    DFSConfigKeys.DFS_DATANODE_DISK_CHECK_TIMEOUT_DEFAULT, TimeUnit.MILLISECONDS);\nif (t <= 0) throw new IllegalStateException(\"dfs.datanode.disk.check.timeout must be > 0, got \" + t);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember per-key semantics: this timeout cannot be 0 - 'disable' is not an option","Validate all dfs.datanode.disk.check.* keys in a pre-deploy config check"],"tags":["hdfs","datanode","disk-check","config","startup","validation"],"backgroundTag":"config-value-out-of-range","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}