Hi

Since you take 15 min to process the file, then try setting a higher
session timeout on the FTP server. The keep alive checks are only in
use when the ftp consumer is idle, not while it process a file.

On Tue, Jan 13, 2015 at 9:39 PM, Luciano Nunes <lnu...@gmail.com> wrote:
> I am working in a piece of code that routes from SFTP input to a bean process
> and then to SFTP output. So, my process takes about 15 minutos to complete
> and when they finishes, the Camel try to delete a input file from SFTP input
> route. At this moment, the FTP server throws an error:
>
> 13 Jan 2015 18:21:26 DEBUG
> org.apache.camel.component.file.remote.FtpOperations.deleteFile - Deleting
> file: ../flex-brazil/Portal_Forn/request_appr/364/NF_4.txt 13 Jan 2015
> 18:21:26 WARN org.slf4j.helpers.MarkerIgnoringBase.warn - Error during
> commit.
> Exchange[org.apache.camel.component.file.GenericFileMessage@3207779]. Caused
> by: [org.apache.camel.component.file.GenericFileOperationFailedException -
> File operation failed: 421 Timeout (900 seconds): closing control
> connection. FTP response 421 received. Server closed connection.. Code: 421]
> org.apache.camel.component.file.GenericFileOperationFailedException: File
> operation failed: 421 Timeout (900 seconds): closing control connection. FTP
> response 421 received. Server closed connection.. Code: 421 at
> org.apache.camel.component.file.remote.FtpOperations.getCurrentDirectory(FtpOperations.java:701)
> at
> org.apache.camel.component.file.remote.FtpOperations.deleteFile(FtpOperations.java:224)
> at
> org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.commit(GenericFileDeleteProcessStrategy.java:71)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:124)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)
> at
> org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:100)
> at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:228)
> at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:61)
> at
> org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:613)
> at
> org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:581)
> at
> org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:240)
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:173)
> at
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
> at
> org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:99)
> at
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
> at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
> at
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745) Caused by:
> org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421
> received. Server closed connection. at
> org.apache.commons.net.ftp.FTP.__getReply(FTP.java:367) at
> org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:483) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) at
> org.apache.commons.net.ftp.FTP.pwd(FTP.java:1454) at
> org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:2658)
> at
> org.apache.camel.component.file.remote.FtpOperations.getCurrentDirectory(FtpOperations.java:697)
> ... 25 more
>
> There are any parameter to teach the Camel to send keepalives to FTP server
> to avoid this situation?
>
> Thanks!
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-SFTP-tp5761656.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to