{"record":{"id":"3f9356c457a07cd0","repo":"apache/hadoop","slug":"44","errorCode":"44","errorMessage":"--conf: configuration file not found: %s","messagePattern":"--conf: configuration file not found: (.+?)","errorType":"exception","errorClass":"ServiceLaunchException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/launcher/ServiceLauncher.java","lineNumber":998,"sourceCode":"      String[] argArray) throws IOException {\n    return new MinimalGenericOptionsParser(conf, commandOptions, argArray);\n  }\n\n  /**\n   * Verify that all the specified filenames exist.\n   * @param filenames a list of files\n   * @throws ServiceLaunchException if a file is not found\n   */\n  protected void verifyConfigurationFilesExist(String[] filenames) {\n    if (filenames == null) {\n      return;\n    }\n    for (String filename : filenames) {\n      File file = new File(filename);\n      LOG.debug(\"Conf file {}\", file.getAbsolutePath());\n      if (!file.exists()) {\n        // no configuration file\n        throw new ServiceLaunchException(EXIT_NOT_FOUND,\n            ARG_CONF_PREFIXED + \": configuration file not found: %s\",\n            file.getAbsolutePath());\n      }\n    }\n  }\n\n  /**\n   * @return Build a log message for starting up and shutting down.\n   * @param classname the class of the server\n   * @param args arguments\n   */\n  protected static String startupShutdownMessage(String classname,\n      List<String> args) {\n    final String hostname = NetUtils.getHostname();\n\n    return StringUtils.createStartupShutdownMessage(classname, hostname,\n        args.toArray(new String[args.size()]));\n  }","sourceCodeStart":980,"sourceCodeEnd":1016,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/launcher/ServiceLauncher.java#L980-L1016","documentation":"After argument parsing succeeds, ServiceLauncher.verifyConfigurationFilesExist() walks every file passed via -conf/--conf and requires File.exists(); a missing file aborts launch with ServiceLaunchException exit code 44 (EXIT_NOT_FOUND) and the absolute path. This is a deliberate fail-fast so a service never starts with silently dropped configuration.","triggerScenarios":"`hadoop ... --conf ./conf/service-site.xml` run from a working directory where the relative path does not resolve; a typo'd filename; the config file never deployed to that node; a parent directory lacking execute permission so the path cannot be resolved.","commonSituations":"Relative --conf paths in cron/Oozie/shell launches where the working directory differs; files copied to some nodes but not all; directory permissions changed during hardening.","solutions":["Check the absolute path printed in the message with `ls` from the same working directory","Use an absolute path for --conf instead of a relative one","Confirm the file was actually deployed/copied to this node","Verify the launching user can traverse (execute bit) every parent directory"],"exampleFix":"# before\nhadoop $SERVICE --conf conf/service-site.xml\n# after\nhadoop $SERVICE --conf /etc/hadoop/conf/service-site.xml","handlingStrategy":"validation","validationCode":"List<String> confFiles = Arrays.asList(\"/etc/hadoop/conf/service-site.xml\");\nfor (String f : confFiles) {\n  if (!java.nio.file.Files.exists(java.nio.file.Paths.get(f))) {\n    throw new IllegalStateException(\"missing --conf file: \" + f);\n  }\n}","typeGuard":null,"tryCatchPattern":"catch (ServiceLaunchException e) {\n  if (e.getExitCode() == ServiceLaunchException.EXIT_NOT_FOUND) {\n    // the message carries the absolute path that was missing\n    log.error(\"config file absent on this node: {}\", e.getMessage());\n  }\n}","preventionTips":["Use absolute paths for --conf in cron/Oozie/service definitions","Add a deploy-time check that every configured conf file exists on each node","Ensure the launching user can traverse parent directories of the conf path"],"tags":["cli","conf","file-not-found","service-launcher","exit-code-44"],"backgroundTag":"file-not-found","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}