{"record":{"id":"8c9071ff2620cbe7","repo":"apache/flink","slug":"the-flink-config-file-does-not-exist-8c9071","errorCode":null,"errorMessage":"The Flink config file '{}' ({}) does not exist.","messagePattern":"The Flink config file '(.+?)' \\((.+?)\\) does not exist\\.","errorType":"validation","errorClass":"IllegalConfigurationException","httpStatus":null,"severity":"critical","filePath":"flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java","lineNumber":144,"sourceCode":"            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        Configuration configuration;\n        File yamlConfigFile = new File(confDirFile, 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 {\n            LOG.info(\n                    \"Using standard YAML parser to load flink configuration file from {}.\",\n                    yamlConfigFile.getAbsolutePath());\n            configuration = loadYAMLResource(yamlConfigFile);\n        }\n\n        final List<String> additionalKeys =\n                configuration.get(SecurityOptions.ADDITIONAL_SENSITIVE_KEYS);\n        logConfiguration(\"Loading\", configuration, additionalKeys);\n\n        if (dynamicProperties != null) {\n            logConfiguration(\"Loading dynamic\", dynamicProperties, additionalKeys);","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L126-L162","documentation":"Thrown by GlobalConfiguration.loadConfiguration (as IllegalConfigurationException) when the conf directory exists but the expected Flink config file (flink-conf.yaml by default) is missing inside it. The loader constructs new File(confDirFile, FLINK_CONF_FILENAME) and checks exists().","triggerScenarios":"The conf directory is valid but flink-conf.yaml was deleted, renamed, or never created. Also triggered by a custom FLINK_CONF_FILENAME that doesn't match what's on disk.","commonSituations":"Minimal or custom Docker images that ship a conf directory without flink-conf.yaml. Renaming the file for templating and forgetting to restore it. Misconfigured mounted volumes that mount the parent dir but not the yaml file.","solutions":["Ensure flink-conf.yaml exists inside the configured conf directory (the error prints the expected path).","If using a custom filename, align it with FLINK_CONF_FILENAME or the distribution default.","Re-copy the default flink-conf.yaml from the distribution template."],"exampleFix":"# error indicates missing file at /opt/flink/conf/flink-conf.yaml\n# before: directory exists but file absent\n\n# after: create or restore the file\ncp /opt/flink/conf/flink-conf.yaml.template /opt/flink/conf/flink-conf.yaml","handlingStrategy":"validation","validationCode":"File yaml = new File(configDir, GlobalConfiguration.getFlinkConfFilename());\nif (!yaml.isFile()) {\n    throw new IllegalArgumentException(\"Missing config file: \" + yaml.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":"try {\n    GlobalConfiguration.loadConfiguration(configDir);\n} catch (IllegalConfigurationException e) {\n    if (e.getMessage().contains(\"does not exist.\")) { /* restore flink-conf.yaml */ }\n}","preventionTips":["Ensure flink-conf.yaml exists in the conf directory.","Include the file in Docker images and volume mounts.","Use the distribution template as a base."],"tags":["configuration","startup","filesystem","yaml"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}