Hi Petr, This could be : 1. Thread pool exhausted(camel uses thread pools, the size of which is configurable) 2. Thread blocked due to sftp not completing. If one thread hangs in this state, a new thread will handle the next file. This second thread could also get blocked; soon all threads in your thread pool will be exhausted, and all file transfer will stop 3. Some programming logic error which is blocking your file read listeners(this is a low probability cause)
Easiest was is to capture a "java thread dump" of the Camel JVM and send it to us. it will show the state of each thread used by Camel. Prajod ________________________________________ From: Petr Šponer [[email protected]] Sent: Thursday, August 07, 2014 1:31 PM To: [email protected] Subject: sftp hang-ups Hi, I have a camel (2.12.0) in a production environment of a telco virtual operator. We are having a strange behavior in the route defined like this: if (ftpUploadEnabled){ from("file:///{{rated_cdr.output_folder}}?include=VPOB_X_FUOM_CONSUM.D.*\\.c sv&delete=true").routeId("exportCdrCounterConsumptionDwhFtp") .onException(Exception.class).handled(true) .log(LoggingLevel.ERROR, "Sending ${file:name} file to FTP has failed.") .log(LoggingLevel.ERROR, "Exception occurred due - ${exception.message}") .log(LoggingLevel.ERROR, "Stacktrace - ${exception.stacktrace}") .end() .to("bean:fileUtility?method=copyToError") .log(LoggingLevel.DEBUG, "Sending ${file:name} file to FTP.") .to("{{rated_cdr.ftp.dwh.proto}}://{{rated_cdr.ftp.dwh.username}}@{{rated_cd r.ftp.dwh.url}}{{rated_cdr.ftp.dwh.output_folder}}" + "?password=RAW({{rated_cdr.ftp.dwh.password}})" + "&disconnect=true" + "&tempFileName={{rated_cdr.ftp.dwh.work_folder_relative_to_output}}/${file:n ame}") .to("bean:fileUtility?method=moveFromErrorToArchive") .log(LoggingLevel.INFO, "${file:name} file has been sent to DWH."); rated_cdr.ftp.dwh.enabled=true rated_cdr.ftp.dwh.url=some.server rated_cdr.ftp.dwh.proto=sftp rated_cdr.ftp.dwh.work_folder_relative_to_output=../tmp rated_cdr.ftp.dwh.output_folder=/daily_extracts_storage/rated_cdr rated_cdr.ftp.dwh.username= some.user rated_cdr.ftp.dwh.password= some.pass The route starts and is working well in the beginning. It works fine for some time but then it stops delivering files to SFTP (I don't see any deterministic pattern). The last file remains in a locked state (*.camelLock) and when I turn off the application I have warnings in a log: 10:36:55.348 [Thread-4] WARN org.apache.camel.impl.DefaultShutdownStrategy - doShutdown - Timeout occurred. Now forcing the routes to be shutdown now. 10:36:55.349 [Camel (dataExporter) thread #31 - ShutdownTask] WARN org.apache.camel.impl.DefaultShutdownStrategy - run - Interrupted while waiting during graceful shutdown, will force shutdown now. 10:36:55.442 [Camel (dataExporter) thread #23 - file:////appl/cdr/rated-cdr] WARN org.apache.camel.component.file.remote.RemoteFileProducer - handleFailedWrite - Writing file failed with: 10:36:55.443 [Camel (dataExporter) thread #23 - file:////appl/cdr/rated-cdr] WARN org.apache.camel.component.file.GenericFileOnCompletion - processStrategyRollback - Rollback file strategy: org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy@35 3158cf for file: GenericFile[/appl/cdr/rated-cdr/VPOB_X_FUOM_CONSUM.D.201407311334.D.004.csv] (END) Anyone have an idea what could be the problem? I'd even appreciate a one-time commercial support because the problem is going to be a bit too critical :) Thanks Petr Sponer The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
