java - Camel SFTP - 无法将目录更改为 '/'

标签 java apache-camel 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: /**

我尝试使用 camel SFTP 选项 maximumReconnectAttempts=10serverAliveInterval=60 并将 camel 版本更改为 2.12.0 然后到 2.10.7(问题已解决的版本),但这些都没有解决我的问题。 似乎是一个错误,但奇怪的是它不是每次都重现我尝试连接到我的服务器。

我很感激任何类型的建议。

最佳答案

我在添加 camel SFTP 选项 disconnect=true 后解决了我的问题。

关于java - Camel SFTP - 无法将目录更改为 '/',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25524582/

相关文章:

java - Selenium 和 xpath : finding a div with a class/id and verifying text inside

java - 如何使用 Apache Camel Netty4 在异步模式下通过已建立的 TCP 连接发回响应?

java - 在 apache Camel 中解码后添加处理器

windows - 从 VBA 代码调用 SFTP 进程

python - 写入使用 Paramiko/pysftp "open"方法打开的 SFTP 服务器上的文件很慢

java - 在 Java 中创建从 .txt 文件读取和写入二维数组的程序时遇到困难

java - 每次单击按钮时 Firebase 都会创建一个新对象

java - 使用 Java Sound API 播放 MP3

java - 使用 apache Camel 处理非常大的 CSV 文件的最佳方法是什么?

Ubuntu 上的 Eclipse : How do I access projects remotely over mounted SFTP connections?