You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] [connector-file-ftp] When accessing an FTP server in a different subnet, it results in a failure to retrieve the FTP directory listing,show: Get file list failed
#8493
Open
2 of 3 tasks
justlkp opened this issue
Jan 10, 2025
· 0 comments
I had searched in the issues and found no similar issues.
What happened
Within the same network segment, the FTP connector can normally read files. However, when accessing the same FTP service with an IP address that is not in the same segment, access is not possible. Yet, under the same circumstances, using an FTP client such as FileZilla allows for normal access. After multiple tests in this scenario, it was found that the FTP connector only functions properly when used within the same network segment.
To clarify further:
When both the FTP server and the connector are on the same subnet, file reading works as expected.
When the FTP server and a device using the connector are on different subnets, the connection fails.
An FTP client like FileZilla can successfully connect to the FTP server regardless of being on the same or a different subnet, indicating that the issue is specific to the FTP connector's configuration or limitations.
在同一个网段下,可以使用ftp连接器可以正常读取文件,但是访问同一个ftp服务,ip地址不在同一个网段,则无法获取ftp文件列表,显示文件不存在,显示Get file list from this path [/test/test.csv] failed , 但是同样情况下使用ftp客户端,比如filezilla可以正常访问,多次测试此种情况,发现只有在同一个网段下该ftp连接器才可以正常使用,已经使用vsftpd 3.0.2和vsftpd 3.0.3多次测试,复现这个问题
./bin/seatunnel.sh --config ./config/testftp2mysqlremote.template -m local
Error Exception
Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:213)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.example.engine.SeaTunnelEngineExample.main(SeaTunnelEngineExample.java:43)
Caused by: org.apache.seatunnel.connectors.seatunnel.file.exception.FileConnectorException: ErrorCode:[FILE-03], ErrorDescription:[Get file list failed] - Get file list from this path [/test/test.csv] failed
at org.apache.seatunnel.connectors.seatunnel.file.ftp.source.FtpFileSource.prepare(FtpFileSource.java:96)
at org.apache.seatunnel.engine.core.parse.JobConfigParser.parseSource(JobConfigParser.java:83)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:370)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:209)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:114)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:182)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:160)
... 2 more
Caused by: java.io.FileNotFoundException: File /test/test.csv does not exist.
at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.getFileStatus(SeaTunnelFTPFileSystem.java:523)
at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.listStatus(SeaTunnelFTPFileSystem.java:439)
at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem.listStatus(SeaTunnelFTPFileSystem.java:421)
at org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy.listStatus(HadoopFileSystemProxy.java:154)
at org.apache.seatunnel.connectors.seatunnel.file.source.reader.AbstractReadStrategy.getFileNamesByPath(AbstractReadStrategy.java:110)
at org.apache.seatunnel.connectors.seatunnel.file.ftp.source.FtpFileSource.prepare(FtpFileSource.java:92)
... 8 more
Process finished with exit code 1
Search before asking
What happened
Within the same network segment, the FTP connector can normally read files. However, when accessing the same FTP service with an IP address that is not in the same segment, access is not possible. Yet, under the same circumstances, using an FTP client such as FileZilla allows for normal access. After multiple tests in this scenario, it was found that the FTP connector only functions properly when used within the same network segment.
To clarify further:
When both the FTP server and the connector are on the same subnet, file reading works as expected.
When the FTP server and a device using the connector are on different subnets, the connection fails.
An FTP client like FileZilla can successfully connect to the FTP server regardless of being on the same or a different subnet, indicating that the issue is specific to the FTP connector's configuration or limitations.
在同一个网段下,可以使用ftp连接器可以正常读取文件,但是访问同一个ftp服务,ip地址不在同一个网段,则无法获取ftp文件列表,显示文件不存在,显示Get file list from this path [/test/test.csv] failed , 但是同样情况下使用ftp客户端,比如filezilla可以正常访问,多次测试此种情况,发现只有在同一个网段下该ftp连接器才可以正常使用,已经使用vsftpd 3.0.2和vsftpd 3.0.3多次测试,复现这个问题
successful config
fail config
SeaTunnel Version
2.3.8
SeaTunnel Config
Running Command
./bin/seatunnel.sh --config ./config/testftp2mysqlremote.template -m local
Error Exception
Zeta or Flink or Spark Version
No response
Java or Scala Version
Java 1.8.0_202
Screenshots
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: