[
https://issues.apache.org/jira/browse/CAMEL-12166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16343735#comment-16343735
]
Roman Vottner commented on CAMEL-12166:
---------------------------------------
We ran into a similar issue today on an old AX400 system where we have to up-
and download files from via FTP. While we hadn't issues before (used a
camel-driven client application on their system since Camel 2.14.1 (and before)
with regular version updates of Camel during this period, in the early morning
suddenly the same behavior as mentioned here occurred and we roughly needed
half a day to fix this issue even though the AX400 server maintainer assured
that he didn't change anything in regards to general server and FTP server
configurations. Note that the most recent versions deployed contained Camel
2.20.1 and for testing even 2.21.0-SNAPSHOT.
Our issue was caused by Camel connecting in active mode to the server by
default. On analyzing the Apache FTP client log we noticed that after
successfully interacting with the server after the second time listing (or the
previous PORT command) the mentioned exception occurred in our logs.
INFO | jvm 1 | 2018/01/29 17:51:47 | CWD tmp
INFO | jvm 1 | 2018/01/29 17:51:47 | 250 Befehl CWD erfolgreich.
INFO | jvm 1 | 2018/01/29 17:51:47 | CWD some_subdir
INFO | jvm 1 | 2018/01/29 17:51:47 | 250 Befehl CWD erfolgreich.
INFO | jvm 1 | 2018/01/29 17:51:47 | SYST
INFO | jvm 1 | 2018/01/29 17:51:47 | 215 UNIX-Typ: L8 Version: BSD-44
INFO | jvm 1 | 2018/01/29 17:51:47 | PORT 1,0,0,130,196,47
INFO | jvm 1 | 2018/01/29 17:51:47 | 200 PORT-Befehl erfolgreich.
INFO | jvm 1 | 2018/01/29 17:51:47 | LIST
INFO | jvm 1 | 2018/01/29 17:53:02 | 425 Keine Datenverbindung
Connecting to the FTP server via FileZilla worked and after studying the
produced logs from FileZilla we noticed that it communicates in passiveMode
which we gave a try. After adding passiveMode=true we managed to read and write
files to the server again. Why the errors occurred without any interactions on
our or the admins behalf is a different storry.
> FTPConsumer - no disconnect if polling files fails
> --------------------------------------------------
>
> Key: CAMEL-12166
> URL: https://issues.apache.org/jira/browse/CAMEL-12166
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.16.2
> Environment: We are using Camel 2.16.2 as part of ServiceMix 6.1.1
> Reporter: Oliver Limberg
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 2.21.0
>
>
> We encountered an issue downoading files from various different ftp servers.
> If listing the files to consume fails for whatever reason, the FTP client
> does not disconnect from the server, even if disconnect=true is specified in
> the endpoint URL.
> This leads to the problem, that upon the next poll, the connection ist still
> open and the component starts to navigate stepwise to the target folder which
> will fail, because we are not in the home folder of the FTP user anymore.
> This leads to an GenericFileOperationFailedException, which will again cause
> the poll to fail without a disconnect. From now on, polling this endpoint
> will fail until restarting the containing route.
>
> Adding stepwise=false as an workaround did not work in our case because one
> of teh external FTP servers will return absolute paths when calling the list
> command, resulting in an error when trying to download the files.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)