我需要通过SFTP连接到服务器,我收到此错误:骆驼SFTP - 无法更改目录“/”
INFO [org.apache.camel.component.file.remote.SftpOperations.connect]: **Connected to sftp://myserver.com:22**
INFO [org.apache.camel.component.file.remote.RemoteFileProducer.connectIfNecessary]: **Connected and logged in to: Endpoint[sftp://myserver.com:22//home/tomcat/directory?password=******]
INFO [org.apache.camel.component.file.remote.SftpOperations$JSchLogger.log]: JSCH -> **Caught an exception, leaving main loop due to Read timed out**
INFO [org.apache.camel.component.file.remote.SftpOperations$JSchLogger.log]: JSCH -> **Disconnecting from myserver.com port 22**
WARN [org.apache.camel.component.file.remote.RemoteFileProducer.handleFailedWrite]: **Writing file failed with: Cannot change directory to: /**
我试图用骆驼SFTP选项maximumReconnectAttempts=10
,serverAliveInterval=60
和改变骆驼版本到2.12.0,然后到2.10.7(问题已解决的版本),但这些问题都没有解决我的问题。 似乎是一个错误,但奇怪的是,它不是每次都重现我尝试连接到我的服务器。
我很欣赏任何形式的建议。
那么,我需要使用绝对路径,因为我想连接到不同的机器。如果我使用相对路径,我无法连接到我需要的目录。 – 2014-08-27 14:12:18
请确保您有权这样做 – 2014-08-27 15:07:42
我拥有我需要的所有权限。有时我能够与成功联系在一起,并且不会抛出异常,但有时我不会。也许我会用骆驼SCP .. – 2014-08-28 06:33:01