{"record":{"id":"be94d99f1c715bfc","repo":"apache/seatunnel","slug":"seatunnel-config-file-was-not-found-in-working-dir","errorCode":null,"errorMessage":"SeaTunnel config file was not found in working directory {} or SparkFiles path {}","messagePattern":"SeaTunnel config file was not found in working directory (.+?) or SparkFiles path (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/command/SparkTaskExecuteCommand.java","lineNumber":111,"sourceCode":"            log.debug(\"Failed to resolve SeaTunnel config file from SparkFiles\", e);\n            log.info(\"Resolved SeaTunnel config file: {}\", configFile.toAbsolutePath());\n            return configFile;\n        }\n        if (sparkFilePath == null) {\n            log.info(\"Resolved SeaTunnel config file: {}\", configFile.toAbsolutePath());\n            return configFile;\n        }\n\n        Path shippedConfigFile = Paths.get(sparkFilePath);\n        if (Files.exists(shippedConfigFile)) {\n            log.info(\"Resolved SeaTunnel config file: {}\", shippedConfigFile.toAbsolutePath());\n            return shippedConfigFile;\n        }\n        if (Files.exists(configFile)) {\n            log.info(\"Resolved SeaTunnel config file: {}\", configFile.toAbsolutePath());\n            return configFile;\n        }\n        log.warn(\n                \"SeaTunnel config file was not found in working directory {} or SparkFiles path {}\",\n                configFile.toAbsolutePath(),\n                shippedConfigFile.toAbsolutePath());\n        return configFile;\n    }\n}\n","sourceCodeStart":93,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/command/SparkTaskExecuteCommand.java#L93-L118","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the config path passed with -c exists relative to the working directory where spark-submit/seatunnel.sh runs.","Ship the config file via Spark's file distribution mechanism or use an absolute path.","Log/inspect configFile.toAbsolutePath() from the warning to see exactly which paths were probed."],"exampleFix":"// before\nsh bin/seatunnel.sh --config ./confg/hive_to_console.conf -e spark\n// after\nsh bin/seatunnel.sh --config ./config/hive_to_console.conf -e spark  # path exists relative to cwd","handlingStrategy":"validation","validationCode":"java.nio.file.Path cfg = java.nio.file.Paths.get(configPath);\nif (!java.nio.file.Files.exists(cfg)) {\n    throw new IllegalArgumentException(\"Config file not found: \" + cfg.toAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run seatunnel.sh from the directory containing the config or pass an absolute path.","Ensure the config is shipped via Spark's file distribution for cluster modes.","Validate config paths in a wrapper script before spark-submit."],"tags":["spark","config","file-resolution"],"backgroundTag":"config-file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}