Reputation: 3987
I upgraded camel from 2.8.0 to 2.10.3 version and my sftp component started failing. Afaik, sftp component uses stepwise by default and had no trouble to change directories previous to upgrade.
Below is a log entry that I see on camel/jsch
20130113 15:28:54,509 INFO [Camel (camel-1) thread #0 - file://../test_outbound/] RemoteFileProducer[193]: Connected and logged in to: Endpoint[sftp://sftp-user@localhost/incoming?disconnect=true&privateKeyFile=xyz.ppk&privateKeyFilePassphrase=**] 20130113 15:28:54,528 WARN [Camel (camel-1) thread #0 - file://../test_outbound/] RemoteFileProducer[71]: Writing file failed with: Cannot change directory to: home 20130113 15:28:54,528 DEBUG [Camel (camel-1) thread #0 - file://../test_outbound/] RemoteFileProducer[86]: Disconnecting from: Endpoint[sftp://sftp-user@localhost/incoming?disconnect=true&privateKeyFile=xyz.ppk&privateKeyFilePassphrase=**] 20130113 15:28:54,529 INFO [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations$JSchLogger[259]: JSCH -> Disconnecting from localhost port 22 20130113 15:28:54,529 INFO [Connect thread localhost session] SftpOperations$JSchLogger[259]: JSCH -> Caught an exception, leaving main loop due to socket closed
Not sure why this is happening? Any ideas appreciated, thanks.
cd works with v2.8.0
20130114 18:42:52,956 INFO [Camel (camel-1) thread #0 - sftp://user@host/outgoing] RemoteFileConsumer[133]: Connected and logged in to: sftp://user@host:22 20130114 18:42:52,956 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[339]: getCurrentDirectory() 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpConsumer[68]: doPollDirectory from absolutePath: outgoing, dirName: null 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[348]: changeCurrentDirectory(outgoing) 20130114 18:42:52,959 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[389]: Changing directory: outgoing 20130114 18:42:52,966 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpConsumer[81]: Polling directory: outgoing 20130114 18:42:52,966 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[415]: listFiles(.) 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpConsumer[94]: Found 2 in directory: outgoing 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[348]: changeCurrentDirectory(/home/sftp-user) 20130114 18:42:52,982 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[389]: Changing directory: / 20130114 18:42:52,988 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[389]: Changing directory: home 20130114 18:42:52,994 TRACE [Camel (camel-1) thread #0 - sftp://user@host/outgoing] SftpOperations[389]: Changing directory: sftp-user 20130114 18:42:53,000 DEBUG [Camel (camel-1) thread #0 - sftp://user@host/outgoing] GenericFileConsumer[84]: Took 0.044 seconds to poll: outgoing
and fails with 2.10.3
20130114 19:15:53,530 INFO [Camel (camel-1) thread #0 - file://../test_outbound/] RemoteFileProducer[193]: Connected and logged in to: Endpoint[sftp://user@host/incoming?disconnect=true&knownHostsFile=known_hosts&privateKeyFile=sftp-user.ppk&privateKeyFilePassphrase=**&separator=Auto] 20130114 19:15:53,530 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[305]: buildDirectory(incoming,false) 20130114 19:15:53,530 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[372]: getCurrentDirectory() 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[381]: changeCurrentDirectory(/home/sftp-user) 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[372]: getCurrentDirectory() 20130114 19:15:53,670 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[430]: Changing directory: \ 20130114 19:15:53,749 TRACE [Camel (camel-1) thread #0 - file://../test_outbound/] SftpOperations[430]: Changing directory: home 20130114 19:15:53,796 WARN [Camel (camel-1) thread #0 - file://../test_outbound/] RemoteFileProducer[71]: Writing file failed with: Cannot change directory to: home
Looks like separator is bad but I tried all 3 options (Windows,Unix,Auto)... none worked.
Upvotes: 1
Views: 1178
Reputation: 3987
Accepted as a bug and fixed, see
https://issues.apache.org/jira/browse/CAMEL-5970
Upvotes: 0