I'm using Camel 2.4 and this route to move files from a remote SFTP site
to a local directory:

        
from("sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=t
rue&move=.done").to("file:/c:/camelTmp")

When I run this in a unit test that extends CamelTestSupport, I usually
get a GenericFileOperationFailedException while the CamelContext is
shutting down.  These are the log entries that I see:

        DEBUG : tearDown test
        DEBUG : ShutdownNow ExecutorService:
java.util.concurrent.threadpoolexecu...@17471e0
        INFO  : Apache Camel 2.4.0 (CamelContext:camel-1) is shutting
down
        INFO  : Starting to graceful shutdown 1 routes (timeout 10
seconds)
        DEBUG : Created new single thread pool for source:
org.apache.camel.impl.defaultshutdownstrat...@16c9867 with name:
ShutdownTask. ->
java.util.concurrent.executors$finalizabledelegatedexecutorserv...@89cc5
e
        DEBUG : There are 1 routes to shutdown
        DEBUG : Suspend complete for:
Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
        INFO  : Route: route1 suspended and shutdown deferred, was
consuming from:
Endpoint[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
        DEBUG : Stopping consumer:
Consumer[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binar
y=true&move=.done]
        DEBUG : Stopping producer: Producer[file:///c:/camelTmp]
        DEBUG : Disconnecting from: sftp://<user>@<host>:22
        INFO  : JSCH -> Disconnecting from <host> port 22
        WARN  : Trying to recover by disconnecting from remote server
forcing a re-connect at next poll: sftp://<user>@<host>:22
        WARN  : Consumer
Consumer[[sftp://<user>@<host>/FTPDir/testFiles?password=<password>&bina
ry=true&move=.done] could not poll endpoint:
sftp://<user>@<host>/FTPDir/testFiles?password=<password>&binary=true&mo
ve=.done caused by: Cannot list directory: FTPDir/testFiles

It looks like the shutdown is occurring in the middle of directory list
operation; it seems to be cause by this exception:

        Caused by: java.io.IOException: inputstream is closed
                at
com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2327)
                at
com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2351)
                at
com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:1924)
                at
com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:1943)
                at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1320)

Things do shutdown but I'm wondering if this is a symptom of a problem?

Phil





THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE 
PRIVILEGED.  If this message was misdirected, BlackRock, Inc. and its 
subsidiaries, ("BlackRock") does not waive any confidentiality or privilege.  
If you are not the intended recipient, please notify us immediately and destroy 
the message without disclosing its contents to anyone.  Any distribution, use 
or copying of this e-mail or the information it contains by other than an 
intended recipient is unauthorized.  The views and opinions expressed in this 
e-mail message are the author's own and may not reflect the views and opinions 
of BlackRock, unless the author is authorized by BlackRock to express such 
views or opinions on its behalf.  All email sent to or from this address is 
subject to electronic storage and review by BlackRock.  Although BlackRock 
operates anti-virus programs, it does not accept responsibility for any damage 
whatsoever caused by viruses being passed.


   

Reply via email to