apache-camel - Camel SFTP无法建立连接
问题描述
我在 localhost:2222 的一个 docker 容器中安装了 SFTP 服务器,用户 user/pass 尝试通过 camel 2.22.0 路由在另一个容器中建立连接,例如
from("sftp:user@localhost:2222/sftp/in?password=pass"))
.log("${file:name}");
但是因为无法连接
Error auto creating directory:/sftp/in due Cannot connect to sftp://user@localhost:2222. This exception is ignored.
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot connect to sftp://pms@localhost:2222
at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:144)
at org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:233)
Caused by: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused (Connection refused)
at com.jcraft.jsch.Util.createSocket(Util.java:394)
从骆驼 2.18.2 移动到骆驼 2.22.0 后得到了这个。有可能修复吗?
解决方案
我们在开发过程中从骆驼 2.20.0 升级到骆驼 2.22.0。升级后,我们无法从另一台服务器访问骆驼。同样的问题,连接被拒绝。我们降级到 2.20.0,一切又开始运转了
推荐阅读
- javascript - 如何在二十一点游戏中通过 JS DOM 更改/添加图像
- jquery - 范围滑块,如詹姆斯艾伦
- php - 在 Repository 中使用 Doctrine 2 ORM 和 OneToOne 获得“排名”
- docker - 运行 docker 容器运行 Ubuntu 导致守护程序错误
- powershell - 在 URL 的末尾添加一个词
- javascript - 将 html 文件发送到浏览器后,javascript 未执行
- c++ - 未定义对数字的 vtable 的引用
- python - 对同一变量进行两次测量的卡尔曼滤波器 (pykalman)
- c# - 如何禁用 Web 应用程序公共端的注册?
- c++ - 带指针的整数数组和字符数组