apache/flink · critical · IllegalConfigurationException
The given configuration directory name '{}' ({}) does not de
Error message
The given configuration directory name '{}' ({}) does not describe an existing directory. What it means
Thrown by GlobalConfiguration.loadConfiguration (as IllegalConfigurationException) when the supplied config directory path does not exist on the filesystem. The path is checked with File.exists() after the null guard.
Source
Thrown at flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java:132
/**
* Loads the configuration files from the specified directory. If the dynamic properties
* configuration is not null, then it is added to the loaded configuration.
*
* @param configDir directory to load the configuration from
* @param dynamicProperties configuration file containing the dynamic properties. Null if none.
* @return The configuration loaded from the given configuration directory
*/
public static Configuration loadConfiguration(
final String configDir, @Nullable final Configuration dynamicProperties) {
if (configDir == null) {
throw new IllegalArgumentException(
"Given configuration directory is null, cannot load configuration");
}
final File confDirFile = new File(configDir);
if (!(confDirFile.exists())) {
throw new IllegalConfigurationException(
"The given configuration directory name '"
+ configDir
+ "' ("
+ confDirFile.getAbsolutePath()
+ ") does not describe an existing directory.");
}
// get Flink yaml configuration file
Configuration configuration;
File yamlConfigFile = new File(confDirFile, FLINK_CONF_FILENAME);
if (!yamlConfigFile.exists()) {
throw new IllegalConfigurationException(
"The Flink config file '"
+ yamlConfigFile
+ "' ("
+ yamlConfigFile.getAbsolutePath()
+ ") does not exist.");
} else {View on GitHub (pinned to 2f3c205e92)
Solutions
- Verify the directory exists at the given absolute path (the error prints the resolved path).
- Correct FLINK_CONF_DIR or the path passed to loadConfiguration.
- In containers, ensure the conf directory volume is mounted before the process starts.
Example fix
# before export FLINK_CONF_DIR=/opt/flink/conf-typo # after export FLINK_CONF_DIR=/opt/flink/conf
Defensive patterns
Strategy: validation
Validate before calling
File d = new File(configDir);
if (!d.isDirectory()) {
throw new IllegalArgumentException("Config dir does not exist: " + d.getAbsolutePath());
} Try / catch
try {
GlobalConfiguration.loadConfiguration(configDir);
} catch (IllegalConfigurationException e) {
if (e.getMessage().contains("does not describe an existing directory")) { /* fix path */ }
} Prevention
- Verify the conf directory exists before startup.
- Use absolute paths to avoid working-directory ambiguity.
- In containers, ensure conf volume mounts are present.
When it happens
Trigger: Passing a path string that does not resolve to an existing directory: typos, wrong relative path, missing mount, or a path that exists but is a file rather than a directory.
Common situations: FLINK_CONF_DIR pointing to a non-existent directory. Container or pod where the conf volume isn't mounted. Relative path resolved from an unexpected working directory.
Related errors
- The Flink config file '{}' ({}) does not exist.
- The configuration directory '{}', specified in the '{}' envi
- The configuration directory was not specified. Please specif
- No valid command-line found.
- Could not create writer state serializer.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/591266bb068c1ad4.
Report an issue: GitHub.