apache/seatunnel · error · FileConnectorException
FILE_LIST_GET_FAILED
FILE_LIST_GET_FAILED
Error message
Get file list from this path [%s] failed
What it means
BaseFileSourceConfig.discoverFilePaths wraps any exception raised while listing files under a configured source path into FileConnectorException with code FILE_LIST_GET_FAILED, using the safe discovery root path as context. This non-Markdown branch attaches the original exception as the cause.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseFileSourceConfig.java:150
private List<String> discoverFilePaths(ReadStrategy discoveryReadStrategy) {
String rootPath = baseFileSourceConfig.get(FileBaseSourceOptions.FILE_PATH);
long startTime = System.currentTimeMillis();
try {
List<String> discoveredFilePaths = discoveryReadStrategy.getFileNamesByPath(rootPath);
log.info(
"File source discovery finished: plugin={}, path={}, files={}, cost={}ms",
getPluginName(),
safeDiscoveryRootContext,
discoveredFilePaths.size(),
System.currentTimeMillis() - startTime);
return discoveredFilePaths;
} catch (Exception ex) {
String errorMsg =
String.format(
"Get file list from this path [%s] failed", safeDiscoveryRootContext);
if (isMarkdownKnowledgeSyncMetadataEnabled(baseFileSourceConfig)) {
throw new FileConnectorException(
FileConnectorErrorCode.FILE_LIST_GET_FAILED,
errorMsg,
MarkdownKnowledgeSyncMetadata.copyStackTraceOnly(ex));
}
throw new FileConnectorException(
FileConnectorErrorCode.FILE_LIST_GET_FAILED, errorMsg, ex);
}
}
private CatalogTable parseCatalogTable(ReadonlyConfig readonlyConfig) {
final CatalogTable catalogTable = catalogTableFromConfig;
boolean configSchema =
readonlyConfig.getOptional(ConnectorCommonOptions.SCHEMA).isPresent();
if (CollectionUtils.isEmpty(filePaths)) {
// When there are no files (including sync_mode=update filtered all files), choose a
// compatible schema so that downstream can initialize correctly.
if (fileFormat == FileFormat.BINARY
|| fileFormat == FileFormat.MARKDOWNView on GitHub (pinned to cf67b549a7)
Solutions
- Verify the configured source path exists and is accessible from the job's execution nodes (test with hadoop fs -ls or the storage CLI).
- Fix the path scheme/typos and ensure the filesystem plugin (hdfs-s3/oss, etc.) and credentials (access keys, kerberos, tokens) are correctly configured.
- Check filesystem permissions for the SeaTunnel runtime user.
- Inspect the caused-by exception in the stack trace for the underlying reason (connection refused, auth error, etc.).
Example fix
// before path = "/user/seatunnel/data/*.csv" // path missing on cluster // after (verified path) path = "/user/seatunnel/dataset/*.csv" # exists and readable on all nodes
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight: verify the path is listable before submitting the job
FileSystem fs = FileSystem.get(new Path(sourcePath).toUri(), hadoopConf);
if (!fs.exists(new Path(sourcePath))) {
throw new IllegalArgumentException("Source path does not exist: " + sourcePath);
}
if (!fs.getFileStatus(new Path(sourcePath)).isDirectory()) {
throw new IllegalArgumentException("Source path is not a directory: " + sourcePath);
} Try / catch
try {
enumerator discovery = sourceConfig.discoverFilePaths(...);
} catch (FileConnectorException e) {
if (FileConnectorErrorCode.FILE_LIST_GET_FAILED.equals(e.getSeaTunnelErrorCode())) {
throw new IllegalStateException("Check source path/credentials: " + e.getCause(), e);
}
throw e;
} Prevention
- Validate path existence and scheme (hdfs://, s3://, local) on all worker nodes before submitting.
- Run hadoop fs -ls / storage CLI with the same credentials the job uses.
- Keep Hadoop/S3 credentials and filesystem plugins installed and up to date on the cluster.
- Use relative-free, absolute, verified paths in configs.
When it happens
Trigger: Any Exception during file discovery (directory does not exist, HDFS/S3/OSS connection failure, permission denied, invalid glob) inside discoverFilePaths, called from getFilePathsForSplitEnumerator or recursively via discoverFilePaths.
Common situations: Typos or wrong scheme in the source 'path' config; Hadoop/S3 credentials missing or expired; path is a file not a directory; network unreachable from the cluster nodes; regex/path patterns matching nothing or failing.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- FILE_LIST_GET_FAILED
- No existing ancestor found while resolving local path ${requ
- Circular condition chain detected: '%s' already exists in th
- Condition for option '%s' has a null operator
- String json deserialization exception.<content>
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9b064b9ff41004f2.
Report an issue: GitHub.