apache/hadoop · error · RuntimeException

Specified configuration does not exists: %s

Error message

Specified configuration does not exists: %s

What it means

Second CLI check in MiniKdc.main(): the <MINIKDCPROPERTIES> argument must point to an existing properties file (org.name, org.domain, kdc.bind.address overrides etc.). If it does not exist, MiniKdc throws RuntimeException 'Specified configuration does not exists: <absolute path>' during startup.

Source

Thrown at hadoop-common-project/hadoop-minikdc/src/main/java/org/apache/hadoop/minikdc/MiniKdc.java:92

      "java.security.krb5.conf";
  public static final String SUN_SECURITY_KRB5_DEBUG =
      "sun.security.krb5.debug";

  public static void main(String[] args) throws Exception {
    if (args.length < 4) {
      System.out.println("Arguments: <WORKDIR> <MINIKDCPROPERTIES> " +
              "<KEYTABFILE> [<PRINCIPALS>]+");
      System.exit(1);
    }
    File workDir = new File(args[0]);
    if (!workDir.exists()) {
      throw new RuntimeException("Specified work directory does not exists: "
              + workDir.getAbsolutePath());
    }
    Properties conf = createConf();
    File file = new File(args[1]);
    if (!file.exists()) {
      throw new RuntimeException("Specified configuration does not exists: "
              + file.getAbsolutePath());
    }
    Properties userConf = new Properties();
    InputStreamReader r = null;
    try {
      r = new InputStreamReader(new FileInputStream(file),
          StandardCharsets.UTF_8);
      userConf.load(r);
    } finally {
      if (r != null) {
        r.close();
      }
    }
    for (Map.Entry<?, ?> entry : userConf.entrySet()) {
      conf.put(entry.getKey(), entry.getValue());
    }
    final MiniKdc miniKdc = new MiniKdc(conf, workDir);
    miniKdc.start();

View on GitHub (pinned to 2add963021)

Solutions

  1. Verify the exact path with ls and fix the argument (use an absolute path)
  2. If the properties file is generated, ensure the generating step runs before MiniKdc starts
  3. Ensure the file is readable by the JVM user

Example fix

# before
java ... MiniKdc /tmp/kdc minikdc.props user.keytab hdfs
# after
java ... MiniKdc /tmp/kdc /etc/minikdc/minikdc.properties user.keytab hdfs
Defensive patterns

Strategy: validation

Validate before calling

File props = new File(args[1]);
if (!props.isFile() || !props.canRead())
  throw new IllegalStateException("MiniKdc properties missing: " + props.getAbsolutePath());

Prevention

When it happens

Trigger: Launching MiniKdc's main with a second argument naming a nonexistent/unreadable .properties file — wrong filename, path relative to a different CWD, or the file not yet generated by the build.

Common situations: Test harnesses referencing target/classes/minikdc.properties before a build step creates it; CI checkouts where the properties file lives elsewhere; typos in the file path.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/aa0f3d90d87b5330. Report an issue: GitHub.