Federico Mariani created CAMEL-26984:
----------------------------------------
Summary: camel-ftp: a directory listing refused by the server
(e.g. PORT refused in active mode) is treated as an empty directory, nothing is
logged
Key: CAMEL-26984
URL: https://issues.apache.org/jira/browse/CAMEL-26984
Project: Camel
Issue Type: Bug
Components: camel-ftp
Affects Versions: 4.18.5, 4.23.0, 4.22.2
Reporter: Federico Mariani
Fix For: 4.24.0
In active mode (the default) a server or firewall that refuses the data
connection, e.g. {{PORT}} answered with {{501 PORT is disabled.}}, makes
commons-net return an empty listing without sending {{LIST}}. The FTP consumer
takes it as an empty directory: every poll succeeds with 0 files, nothing is
logged, and the files stay on the server.
Reproduction: an FTP server with active mode disabled and a file in {{inbox}}:
{code:java}
from("ftp://admin@localhost:21/inbox?password=admin").to("mock:result"); //
receives nothing, no WARN
{code}
The same route with {{passiveMode=true}} consumes the file.
Expected: the poll fails with a {{GenericFileOperationFailedException}}
carrying the reply code and text (here 501), so the poll strategy logs it, with
a hint to try {{passiveMode=true}}. Replies 450 and 550 (missing or empty
directory) keep giving an empty listing.
_Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)