Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [FTP] FTP SOURCE Unable to return file list under FTP path in the code & FTP SINK NOT CONFIG ROOT PATH #6077

Closed
3 tasks done
WilliamTan778 opened this issue Dec 25, 2023 · 0 comments
Assignees
Labels

Comments

@WilliamTan778
Copy link
Contributor

WilliamTan778 commented Dec 25, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

FTP SOURCE, PATH IS NOT FOUND

SeaTunnel Version

dev version

SeaTunnel Config

{
  "env": {
    "execution.parallelism": 2,
    //仅支持BATCH 批处理操作
    "job.mode": "BATCH",
    "checkpoint.interval": 10000
  },

  "source": [
    {
       "plugin_name": "FtpFile",
      // 这个作为流程中的别名
      "result_table_name": "tableA",
      "host":"172.30.13.179",
      "port":"2121",
      "user":"firewolf",
      "password":"P@ssw0rd01!",
      // 数据格式类型
      "file_format_type":"csv",
      // 字段分隔符
      "delimiter":",",
      "path":"/data.csv",
      "schema":{
                "fields":{
                    "id":"int",
                    "job_id":"int",
                  "node_id":"string",
                  "name":"string"
                }
            }
    }
  ],

"sink": [
    {   
      "plugin_name": "FtpFile",
      // 写入格式json
      "file_format_type": "csv",
      "host":"172.30.13.179",
      "port":"2121",
      "user":"firewolf",
      "password":"P@ssw0rd01!",
      // 写入文件路径地址
      "path":"/",
      // 列分隔符
      "field_delimiter":",",
      // 行分隔符
      "row_delimiter":"\n",
      // 指定源头是transform中的虚拟表
      "source_table_name": "tableC"
    }
  ]
}




Running Command

curl --location 'http://172.30.13.177:5801/hazelcast/rest/maps/submit-job' \
--header 'Content-Type: application/json' \
--data-raw '{
  "env": {
    "execution.parallelism": 2,
    //仅支持BATCH 批处理操作
    "job.mode": "BATCH",
    "checkpoint.interval": 10000
  },

  "source": [
    {
       "plugin_name": "FtpFile",
      // 这个作为流程中的别名
      "result_table_name": "tableA",
      "host":"172.30.13.179",
      "port":"2121",
      "user":"firewolf",
      "password":"P@ssw0rd01!",
      // 数据格式类型
      "file_format_type":"csv",
      // 字段分隔符
      "delimiter":",",
      "path":"/data.csv",
      "schema":{
                "fields":{
                    "id":"int",
                    "job_id":"int",
                  "node_id":"string",
                  "name":"string"
                }
            }
    }
  ],

"sink": [
    {   
      "plugin_name": "FtpFile",
      // 写入格式json
      "file_format_type": "csv",
      "host":"172.30.13.179",
      "port":"2121",
      "user":"firewolf",
      "password":"P@ssw0rd01!",
      // 写入文件路径地址
      "path":"/",
      // 列分隔符
      "field_delimiter":",",
      // 行分隔符
      "row_delimiter":"\n",
      // 指定源头是transform中的虚拟表
      "source_table_name": "tableC"
    }
  ]
}'

Error Exception

FTP SOURCE Unable to return file list under FTP path in the code:

org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException: ErrorCode:[FILE-03], ErrorDescription:[Get file list failed] - Get file list from this path [/data.csv] failed
        at org.apache.seatunnel.connectors.seatunnel.file.ftp.source.FtpFileSource.prepare(FtpFileSource.java:88) ~[?:?]
        at org.apache.seatunnel.engine.core.parse.JobConfigParser.parseSource(JobConfigParser.java:84) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:309) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:182) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.server.rest.RestJobExecutionEnvironment.getLogicalDag(RestJobExecutionEnvironment.java:76) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.server.rest.RestJobExecutionEnvironment.build(RestJobExecutionEnvironment.java:99) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handleSubmitJob(RestHttpPostCommandProcessor.java:138) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handle(RestHttpPostCommandProcessor.java:77) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at org.apache.seatunnel.engine.server.rest.RestHttpPostCommandProcessor.handle(RestHttpPostCommandProcessor.java:55) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at com.hazelcast.internal.ascii.TextCommandServiceImpl$CommandExecutor.run(TextCommandServiceImpl.java:402) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_312]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_312]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
        at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
        at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
Caused by: java.io.FileNotFoundException: File /data.csv does not exist.
        at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.getFileStatus(SeaTunnelFTPFileSystem.java:459) ~[?:?]
        at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.listStatus(SeaTunnelFTPFileSystem.java:406) ~[?:?]
        at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.listStatus(SeaTunnelFTPFileSystem.java:391) ~[?:?]
        at org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy.listStatus(HadoopFileSystemProxy.java:175) ~[?:?]
        at org.apache.seatunnel.connectors.seatunnel.file.source.reader.AbstractReadStrategy.getFileNamesByPath(AbstractReadStrategy.java:93) ~[?:?]
        at org.apache.seatunnel.connectors.seatunnel.file.ftp.source.FtpFileSource.prepare(FtpFileSource.java:85) ~[?:?]
        ... 15 more


FTP SINK NOT ROOT PATH:

java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ftp://T_792686344391360513_528d0e3d11_0_1_0.csvSaaS(å¤%C2%9Aç§%C2%9Fæ%C2%88·)å%C2%8C%C2%96设计ä¸%C2%8Eå®%C2%9Eç%C2%8E°.docxSaaS(å¤%C2%9Aç§%C2%9Fæ%C2%88·)å%C2%8C%C2%96设计ä¸%C2%8Eå®%C2%9Eç%C2%8E°.docx
	at org.apache.hadoop.fs.Path.initialize(Path.java:259) ~[seatunnel-hadoop3-3.1.4-uber.jar:2.3.4-SNAPSHOT]
	at org.apache.hadoop.fs.Path.<init>(Path.java:157) ~[seatunnel-hadoop3-3.1.4-uber.jar:2.3.4-SNAPSHOT]
	at org.apache.hadoop.fs.Path.<init>(Path.java:125) ~[seatunnel-hadoop3-3.1.4-uber.jar:2.3.4-SNAPSHOT]
	at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.getFileStatus(SeaTunnelFTPFileSystem.java:510) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.listStatus(SeaTunnelFTPFileSystem.java:437) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.delete(SeaTunnelFTPFileSystem.java:370) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.delete(SeaTunnelFTPFileSystem.java:376) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.delete(SeaTunnelFTPFileSystem.java:345) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy.renameFile(HadoopFileSystemProxy.java:122) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileSinkAggregatedCommitter.lambda$commit$0(FileSinkAggregatedCommitter.java:53) ~[?:?]
	at java.util.ArrayList.forEach(ArrayList.java:1541) ~[?:?]
	at org.apache.seatunnel.connectors.seatunnel.file.sink.commit.FileSinkAggregatedCommitter.commit(FileSinkAggregatedCommitter.java:45) ~[?:?]
	at org.apache.seatunnel.engine.server.task.SinkAggregatedCommitterTask.notifyCheckpointComplete(SinkAggregatedCommitterTask.java:307) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at org.apache.seatunnel.engine.server.checkpoint.operation.CheckpointFinishedOperation.lambda$run$0(CheckpointFinishedOperation.java:91) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at org.apache.seatunnel.common.utils.RetryUtils.retryWithException(RetryUtils.java:48) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at org.apache.seatunnel.engine.server.checkpoint.operation.CheckpointFinishedOperation.run(CheckpointFinishedOperation.java:81) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:189) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:273) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:248) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:213) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:175) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:139) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
	at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102) ~[seatunnel-starter.jar:2.3.4-SNAPSHOT]
Caused by: java.net.URISyntaxException: Relative path in absolute URI: ftp://T_792686344391360513_528d0e3d11_0_1_0.csvSaaS(å¤%C2%9Aç§%C2%9Fæ%C2%88·)å%C2%8C%C2%96设计ä¸%C2%8Eå®%C2%9Eç%C2%8E°.docxSaaS(å¤%C2%9Aç§%C2%9Fæ%C2%88·)å%C2%8C%C2%96设计ä¸%C2%8Eå®%C2%9Eç%C2%8E°.docx
	at java.net.URI.checkPath(URI.java:1940) ~[?:?]
	at java.net.URI.<init>(URI.java:757) ~[?:?]
	at org.apache.hadoop.fs.Path.initialize(Path.java:256) ~[seatunnel-hadoop3-3.1.4-uber.jar:2.3.4-SNAPSHOT]
	... 23 more








Zeta or Flink or Spark Version

Zeta

Java or Scala Version

1.8

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@WilliamTan778 WilliamTan778 changed the title [Bug] [Module Name] Bug title [Bug] [FTP] FTP SOURCE Unable to return file list under FTP path in the code & FTP SINK NOT CONFIG ROOT PATH Dec 25, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 25, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 25, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 25, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
@WilliamTan778 WilliamTan778 reopened this Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 26, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 27, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 27, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 27, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 27, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 28, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 28, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 28, 2023
WilliamTan778 pushed a commit to WilliamTan778/seatunnel that referenced this issue Dec 29, 2023
@hailin0 hailin0 closed this as completed Jan 2, 2024
alextinng pushed a commit to alextinng/seatunnel that referenced this issue Jan 4, 2024
alextinng pushed a commit to alextinng/seatunnel that referenced this issue Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants