我有一条骆驼路线,就像永远被绞死一样,不确定它是Camel还是Ftp客户端问题. ftp组件的soTimeout设置为60000.感谢任何帮助.
Version of components:
camel-ftp: 2.9.0
Commons Net: (2.2)
线程转储:
"Camel (some-ftp-route) thread #57 - ftp://user@ftphost/folder" Id=338 in RUNNABLE (running in native) at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) - locked java.io.InputStreamReader@6a3f933a at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.readLine(BufferedReader.java:299) - locked java.io.InputStreamReader@6a3f933a at java.io.BufferedReader.readLine(BufferedReader.java:362) at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:295) at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:365) at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:630) at org.apache.commons.net.SocketClient.connect(SocketClient.java:164) at org.apache.commons.net.SocketClient.connect(SocketClient.java:184) at org.apache.camel.component.file.remote.FtpOperations.connect(FtpOperations.java:91) at org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:144) at org.apache.camel.component.file.remote.RemoteFileConsumer.recoverableConnectIfNecessary(RemoteFileConsumer.java:123) at org.apache.camel.component.file.remote.RemoteFileConsumer.prePollCheck(RemoteFileConsumer.java:56) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:100) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
我很惊讶soTimeout没有用.它挂了差不多1天……
解决方法
这已在Camel 2.13.4,2.14.2和2.15.0中修复
Camel 2.15.0的提交如下:
https://github.com/apache/camel/commit/3774c01e71cf8715e90673328655fd426242e7ba