{"record":{"id":"76d5ebf5242d4f8a","repo":"apache/seatunnel","slug":"file-list-get-failed-76d5eb","errorCode":"FILE_LIST_GET_FAILED","errorMessage":"Get file list from this path [%s] failed","messagePattern":"Get file list from this path \\[(.+?)\\] failed","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"critical","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSource.java","lineNumber":93,"sourceCode":"                fileFormat == FileFormat.MARKDOWN\n                        && pluginConfig.get(FileBaseSourceOptions.MARKDOWN_RAG_METADATA_ENABLED);\n        this.readStrategy.setPluginConfig(pluginConfig.toConfig());\n        this.readStrategy.init(hadoopConf);\n        String path = pluginConfig.get(FileBaseSourceOptions.FILE_PATH);\n        // Fail fast and retain the sanitized root for diagnostics without replacing the logical\n        // identity that MarkdownReadStrategy derives for each discovered file.\n        String safeDiscoveryRootContext =\n                documentRoutingEnabled\n                        ? MarkdownKnowledgeSyncMetadata.canonicalizeSourceUri(path)\n                        : path;\n        try {\n            filePaths = readStrategy.getFileNamesByPath(path);\n        } catch (IOException e) {\n            String errorMsg =\n                    String.format(\n                            \"Get file list from this path [%s] failed\", safeDiscoveryRootContext);\n            if (documentRoutingEnabled) {\n                throw new FileConnectorException(\n                        FileConnectorErrorCode.FILE_LIST_GET_FAILED,\n                        errorMsg,\n                        MarkdownKnowledgeSyncMetadata.copyStackTraceOnly(e));\n            }\n            throw new FileConnectorException(\n                    FileConnectorErrorCode.FILE_LIST_GET_FAILED, errorMsg, e);\n        }\n\n        // support user-defined schema\n        CatalogTable userDefinedCatalogTable;\n        // only json text csv type support user-defined schema now\n        if (pluginConfig.getOptional(ConnectorCommonOptions.SCHEMA).isPresent()) {\n            switch (fileFormat) {\n                case CSV:\n                case TEXT:\n                case JSON:\n                case EXCEL:\n                case XML:","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSource.java#L75-L111","documentation":"BaseFileSource's constructor initializes the source by enumerating files under the configured path via readStrategy.getFileNamesByPath(path). If that throws IOException, the source fails fast with FileConnectorException FILE_LIST_GET_FAILED, 'Get file list from this path [%s] failed'. When document routing is enabled it throws with a copied stack trace; otherwise the original cause is attached. This means the connector could not even list input files, before any read started.","triggerScenarios":"Source plugin init where the HDFS/local filesystem list operation on the configured path throws IOException — path does not exist, permission denied, namenode unreachable, or invalid URI.","commonSituations":"Typo in source path or wrong filesystem scheme; Kerberos/credential problems making listing fail; HDFS in safe mode or S3 endpoint misconfigured; directory deleted between job submit and execution; using a file (not directory) path where listing semantics differ.","solutions":["Verify the path exists and is readable: run hadoop fs -ls <path> (or ls for local) as the job user","Check the wrapped IOException cause for permission vs connectivity vs not-found","Fix filesystem configuration (core-site/hdfs credentials, S3 endpoint/keys) on all nodes","Correct the source path in the job config; ensure the directory is populated before job start"],"exampleFix":"# before\nsource {\n  File {\n    path = \"hdfs://nn/data/input-2024*\"  # not found / no permission\n  }\n}\n# after: verify with `hadoop fs -ls /data/` then set\n    path = \"hdfs://nn/data/input\"\n","handlingStrategy":"try-catch","validationCode":"// before submit\nhadoop fs -test -d <path> && hadoop fs -test -e <path> || echo \"path missing/unreadable\"","typeGuard":null,"tryCatchPattern":"try { source.open(ctx); } catch (FileConnectorException e) { if (e.getErrorCode() == FILE_LIST_GET_FAILED) { log(e.getCause()); /* fix path/permissions, then retry */ } }","preventionTips":["Pre-validate source paths exist and are readable as the job user before submission","Keep Kerberos/S3 credentials valid on all nodes","Avoid glob/regex paths that can match nothing; create directories before job start"],"tags":["file-source","io","file-listing","hdfs"],"backgroundTag":"file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}