git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Camel FTP Producer catches errors silently


Hi.



We are using Camel 2.20.2 to transfer files to remote servers.



Our route is built like that - sorry that I can't provide a fully featured application and all beans.



               from("direct:chunk.process")

                                                           .routeId(DEFAULT_ROUTE_ID_STRING)

                                                           .process("feedNotificationProcessor")

                                                 .onException(Exception.class).handled(false)

                                                           .end()

                                            .recipientList(exchangeProperty(RECIPIENTLIST_HEADER).tokenize(RECIPIENTLIST_SEPARATOR))

                                                           .parallelProcessing().timeout(40000)

                                               .executorService(customThreadPoolExecutor)

                                            .streaming().aggregationStrategyRef("recipientAggregationStrategy")

                                                           .to("direct:chunk.evaluate");



We are dispatching to (multiple) dynamic FTP producers with routes like that:



ftp://myHost/?fileName=myfile.xml&password=secret&binary=false&passiveMode=false&username=user&disconnect=true&fastExistsCheck=true&ftpClient.dataTimeout=30000&ftpClient.defaultTimeout=30000&ftpClient.connectTimeout=30000&soTimeout=30000&stepwise=false



When something fails, we would expect that we recognize that in the 'aggregate' callback of our aggregation strategy call with 'CamelFailureEndpoint' and 'CamelExceptionCaught' properties set, so that we can retry or report failure to our system.



However, in certain cases it appears that we only get a WARN logging but no error set in the Exchange



               [2018-04-03 14:38:21,426][[WARN ][org.apache.camel.component.file.remote.RemoteFileProducer][[]][2188110951-169-19445712825] Exception occurred during disconnecting from: ftp://myhost/? binary=false&disconnect=true&fastExistsCheck=true&ftpClient.connectTimeout=30000&ftpClient.dataTimeout=30000&ftpClient.defaultTimeout=30000&ftpClient.receiveDataSocketBufferSize=30720&ftpClient.sendDataSocketBufferSize=307 20&ftpClient.strictReplyParsing=false&passiveMode=false&password=xxxxxx&soTimeout=30000&stepwise=false&username=user File operation failed:  Connection closed without indication.. Code: 221



It looks as if this just happens on cleanup of connections after upload but our recipient confirmed that the corresponding FTP session dropped just after creating the data connection



2018-04-03 14:38:21,372 [99773] <encode:5>: decoded 'myfile.xml' into 'myfile.xml'

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_exec.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_rewrite.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_tls.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_core.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_core.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_ratio.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_quotatab.c

2018-04-03 14:38:21,372 [99773] <command:7>: dispatching PRE_CMD command 'STOR myfile.xml' to mod_xfer.c

2018-04-03 14:38:21,372 [99773] <encode:5>: decoded 'myfile.xml' into 'myfile.xml'

2018-04-03 14:38:21,374 [99773] <command:7>: dispatching CMD command 'STOR myfile.xml' to mod_xfer.c

2018-04-03 14:38:21,397 [99773] <response:1>: 150 Opening ASCII mode data connection for myfile.xml

2018-04-03 14:38:21,430 [99773] <encode:5>: decoded '/myfile.xml' into '/myfile.xml'

2018-04-03 14:38:21,430 [99773] <command:7>: dispatching POST_CMD_ERR command 'QUIT /myfile.xml' to mod_exec.c

2018-04-03 14:38:21,430 [99773] <command:7>: dispatching LOG_CMD_ERR command 'QUIT /myfile.xml' to mod_log.c

2018-04-03 14:38:21,430 [99773] <command:7>: dispatching LOG_CMD_ERR command 'QUIT /myfile.xml' to mod_core.c



Is this intended behavior of Camel? it is quite inconvenient to miss out failed uploads due to that (not being aware of any errors except for logging)



Kind regards,

Florian

CONFIDENTIALITY: This email and any files transmitted with it are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. PRIVACY: Perform Media Services Ltd (a member of the Perform Group, with Companies House registration number 3426471) may monitor email traffic data and also the content of email for the purposes of security and staff training. For information on how the Perform Group processes your information, please refer to http://www.performgroup.com/privacy-notice/. SECURITY: Please be aware that emails are not secure and may contain viruses. AUTHORITY: Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of the Perform Group. COPYRIGHT: Copyright of this email and any attachments belongs to Perform Group Limited, Companies House registration number 6324278. Further information about Perform Group is available at www.performgroup.com