camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: sftp hang-ups
Date Thu, 07 Aug 2014 08:50:39 GMT
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

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.


From: Petr Šponer []
Sent: Thursday, August 07, 2014 1:31 PM
Subject: sftp hang-ups


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){



                                        .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}")



                        .log(LoggingLevel.DEBUG, "Sending ${file:name} file
to FTP.")

r.ftp.dwh.url}}{{rated_cdr.ftp.dwh.output_folder}}" +

"?password=RAW({{rated_cdr.ftp.dwh.password}})" +

                                "&disconnect=true" +



                        .log(LoggingLevel.INFO, "${file:name} file has been
sent to DWH.");






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:
3158cf for file:


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.

View raw message