apache/seatunnel · warning

SeaTunnel config file was not found in working directory

Error message

SeaTunnel config file was not found in working directory {} or SparkFiles path {}

What it means

SparkTaskExecuteCommand.resolveConfigPath tries to locate the SeaTunnel config file: first the file shipped via Spark's file distribution (SparkFiles path), then the working-directory path. If neither exists, it logs this warning but still returns the working-directory path, deferring the failure to config parsing downstream.

Solutions

  1. Verify the config path passed with -c exists relative to the working directory where spark-submit/seatunnel.sh runs.
  2. Ship the config file via Spark's file distribution mechanism or use an absolute path.
  3. Log/inspect configFile.toAbsolutePath() from the warning to see exactly which paths were probed.

Example fix

// before
sh bin/seatunnel.sh --config ./confg/hive_to_console.conf -e spark
// after
sh bin/seatunnel.sh --config ./config/hive_to_console.conf -e spark  # path exists relative to cwd
Defensive patterns

Strategy: validation

Validate before calling

java.nio.file.Path cfg = java.nio.file.Paths.get(configPath);
if (!java.nio.file.Files.exists(cfg)) {
    throw new IllegalArgumentException("Config file not found: " + cfg.toAbsolutePath());
}

Prevention

When it happens

Trigger: Submitting a Spark job where the -c/--config path does not exist on the driver's working directory and the file was not shipped via Spark file distribution (e.g. missing file shipping or wrong relative path); called by configFile during command build.

Common situations: Running spark-submit in client mode from a directory other than the config's location; forgetting to ship the config file; typo in the config path; running on a cluster where the config exists only on the submit host.

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/be94d99f1c715bfc. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/command/SparkTaskExecuteCommand.java:111

            log.debug("Failed to resolve SeaTunnel config file from SparkFiles", e);
            log.info("Resolved SeaTunnel config file: {}", configFile.toAbsolutePath());
            return configFile;
        }
        if (sparkFilePath == null) {
            log.info("Resolved SeaTunnel config file: {}", configFile.toAbsolutePath());
            return configFile;
        }

        Path shippedConfigFile = Paths.get(sparkFilePath);
        if (Files.exists(shippedConfigFile)) {
            log.info("Resolved SeaTunnel config file: {}", shippedConfigFile.toAbsolutePath());
            return shippedConfigFile;
        }
        if (Files.exists(configFile)) {
            log.info("Resolved SeaTunnel config file: {}", configFile.toAbsolutePath());
            return configFile;
        }
        log.warn(
                "SeaTunnel config file was not found in working directory {} or SparkFiles path {}",
                configFile.toAbsolutePath(),
                shippedConfigFile.toAbsolutePath());
        return configFile;
    }
}

View on GitHub (pinned to cf67b549a7)