{"record":{"id":"1732c4fabe59921a","repo":"apache/hadoop","slug":"invalid-attribute-value-for-hadoop-kerberos-min-se","errorCode":null,"errorMessage":"Invalid attribute value for hadoop.kerberos.min.seconds.before.relogin of \" + conf.get(HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN)","messagePattern":"Invalid attribute value for hadoop\\.kerberos\\.min\\.seconds\\.before\\.relogin of \" \\+ conf\\.get\\(HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java","lineNumber":326,"sourceCode":"   */\n  private static synchronized void initialize(Configuration conf,\n                                              boolean overrideNameRules) {\n    authenticationMethod = SecurityUtil.getAuthenticationMethod(conf);\n    if (overrideNameRules || !HadoopKerberosName.hasRulesBeenSet()) {\n      try {\n        HadoopKerberosName.setConfiguration(conf);\n      } catch (IOException ioe) {\n        throw new RuntimeException(\n            \"Problem with Kerberos auth_to_local name configuration\", ioe);\n      }\n    }\n    try {\n        kerberosMinSecondsBeforeRelogin = 1000L * conf.getLong(\n                HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN,\n                HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN_DEFAULT);\n    }\n    catch(NumberFormatException nfe) {\n        throw new IllegalArgumentException(\"Invalid attribute value for \" +\n                HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN + \" of \" +\n                conf.get(HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN));\n    }\n\n    kerberosKeyTabLoginRenewalEnabled = conf.getBoolean(\n            HADOOP_KERBEROS_KEYTAB_LOGIN_AUTORENEWAL_ENABLED,\n            HADOOP_KERBEROS_KEYTAB_LOGIN_AUTORENEWAL_ENABLED_DEFAULT);\n\n    // If we haven't set up testing groups, use the configuration to find it\n    if (!(groups instanceof TestingGroups)) {\n      groups = Groups.getUserToGroupsMappingService(conf);\n    }\n    UserGroupInformation.conf = conf;\n\n    if (metrics.getGroupsQuantiles == null) {\n      int[] intervals = conf.getInts(HADOOP_USER_GROUP_METRICS_PERCENTILES_INTERVALS);\n      if (intervals != null && intervals.length > 0) {\n        final int length = intervals.length;","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java#L308-L344","documentation":"During UGI static initialization the value of hadoop.kerberos.min.seconds.before.relogin is read with Configuration.getLong (default 60). A non-numeric value raises NumberFormatException, rethrown as IllegalArgumentException naming the key and the raw configured value.","triggerScenarios":"core-site.xml sets hadoop.kerberos.min.seconds.before.relogin to a non-integer (e.g. '60s', '1,000', or an empty tag) and any code path touches UserGroupInformation initialization.","commonSituations":"Copy-pasted configuration with units appended; property left empty by templating; YAML-to-XML conversion writing a boolean or float.","solutions":["Set the property to a plain integer, e.g. <value>60</value>","Remove the property entirely to accept the default of 60 seconds","Search the full config chain (core-site.xml, _override, cluster management overlays) for a duplicated key holding the bad value"],"exampleFix":"<!-- before -->\n<property>\n  <name>hadoop.kerberos.min.seconds.before.relogin</name>\n  <value>60s</value>\n</property>\n<!-- after -->\n<property>\n  <name>hadoop.kerberos.min.seconds.before.relogin</name>\n  <value>60</value>\n</property>","handlingStrategy":"validation","validationCode":"String v = conf.get(\"hadoop.kerberos.min.seconds.before.relogin\");\nif (v != null && !v.matches(\"\\\\d+\")) {\n  throw new IllegalArgumentException(\n      \"hadoop.kerberos.min.seconds.before.relogin must be an integer, got: \" + v);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate numeric Hadoop properties at config load in a shared bootstrap step","Never append units to integer-only properties","Use XML-aware tooling (not string templating) to generate site files"],"tags":["hadoop","configuration","kerberos","relogin","ugi"],"backgroundTag":"invalid-configuration-value","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}