{"record":{"id":"4634ebcafbf25efb","repo":"apache/flink","slug":"the-given-configuration-directory-name-d","errorCode":null,"errorMessage":"The given configuration directory name '{}' ({}) does not describe an existing directory.","messagePattern":"The given configuration directory name '(.+?)' \\((.+?)\\) does not describe an existing directory\\.","errorType":"validation","errorClass":"IllegalConfigurationException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/configuration/ConfigurationFileMigrationUtils.java","lineNumber":69,"sourceCode":"     * Migrates the legacy Flink configuration from the specified directory to a standard YAML\n     * format representation.\n     *\n     * <p>This method loads the legacy configuration file named {@code flink-conf.yaml} from the\n     * specified directory. If the file is found, it converts the legacy format into a standard\n     * {@link Configuration} object in YAML format.\n     *\n     * @param configDir the directory where the legacy configuration file is located\n     * @return a {@link Configuration} object in standard YAML format\n     */\n    public static Configuration migrateLegacyToStandardYamlConfig(final String configDir) {\n        if (configDir == null) {\n            throw new IllegalArgumentException(\n                    \"Given configuration directory is null, cannot load configuration\");\n        }\n\n        final File confDirFile = new File(configDir);\n        if (!(confDirFile.exists())) {\n            throw new IllegalConfigurationException(\n                    \"The given configuration directory name '\"\n                            + configDir\n                            + \"' (\"\n                            + confDirFile.getAbsolutePath()\n                            + \") does not describe an existing directory.\");\n        }\n\n        // get Flink yaml configuration file\n        Map<String, String> configuration;\n        File yamlConfigFile = new File(confDirFile, LEGACY_FLINK_CONF_FILENAME);\n        if (!yamlConfigFile.exists()) {\n            throw new IllegalConfigurationException(\n                    \"The Flink config file '\"\n                            + yamlConfigFile\n                            + \"' (\"\n                            + yamlConfigFile.getAbsolutePath()\n                            + \") does not exist.\");\n        } else {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/configuration/ConfigurationFileMigrationUtils.java#L51-L87","documentation":"The second guard in migrateLegacyToStandardYamlConfig: after the null check it wraps configDir in a File and requires it to exist. A non-existent directory throws IllegalConfigurationException showing both the given name and its absolute path. Flink fails here rather than silently running with defaults, because a missing conf directory almost always means a broken installation or a wrong FLINK_CONF_DIR.","triggerScenarios":"FLINK_CONF_DIR (or the --configDir argument) pointing to a path that does not exist on this machine; relative directory resolved against an unexpected working directory (e.g. running from a different cwd than assumed); typo'd path; container image where conf/ was not copied.","commonSituations":"Docker/Kubernetes images built without copying the conf directory; symlinks broken after moving a Flink distribution; env var pointing to the build host's path; running bin/flink from a different directory with a relative conf dir.","solutions":["Point FLINK_CONF_DIR at an existing directory (verify with 'ls $FLINK_CONF_DIR').","Use an absolute path to avoid working-directory-dependent resolution.","In container images, ensure COPY of the conf directory actually happened and the path in the env var matches it.","If starting from a fresh distribution, restore the default <flink-home>/conf directory."],"exampleFix":"# before\nexport FLINK_CONF_DIR=conf # resolved against wrong cwd\n\n# after\nexport FLINK_CONF_DIR=/opt/flink/conf","handlingStrategy":"validation","validationCode":"File dir = new File(configDir);\nif (!dir.exists() || !dir.isDirectory()) {\n    throw new IllegalStateException(\"Config directory missing: \" + dir.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for FLINK_CONF_DIR.","In container images, verify the conf directory was copied (build-time CHECK).","Add a startup preflight check listing required paths."],"tags":["configuration","path","startup","environment","flink-core"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}