Hassan Faouaz created CAMEL-7149:
------------------------------------
Summary: FTP Camel Component hangs upon retrieval of files
Key: CAMEL-7149
URL: https://issues.apache.org/jira/browse/CAMEL-7149
Project: Camel
Issue Type: Bug
Components: camel-ftp
Affects Versions: 2.12.2
Environment: Linux. jdk 1.7
Reporter: Hassan Faouaz
Few our routes hung after a successful connection to a ftp server. After
performing a thread dump, we realized that most our routes that are hung are
spinning their wheels while listing the files on the FTP server. We are
suspecting around the fact that the FTPClient socket timeout is not propagating
to the camel level that is causing it to stay running.
Below is the stack strace:
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
- locked <3b761536> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.read(BufferedReader.java:175)
- locked <3b761536> (a java.io.InputStreamReader)
at
org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:58)
- locked <3b761536> (a java.io.InputStreamReader)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:314)
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)
at
org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:47)
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:117)
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$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
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:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)