首页 > 解决方案 > 如果查询的远程目录中有很多文件(超过 10,000 个),Camel sftp 会失败

问题描述

有没有人也遇到过这种行为并且知道解决方案?so_timeout 似乎是要放大的参数,但我没有成功。

在我发现管道关闭引起的日志文件中。

手动 sftp 和 'ls *' 命令需要 20 多分钟才能恢复列表。所以我猜这是骆驼超时。可以按路线设置吗?

2020-02-07T15:54:29,624 WARN  [com.bank.fuse.filetransfer.config.bankFileTransferManagerLoggingNotifier] (Camel (rabobank-file-transfer-manager-core) thread #4494 - sftp://server.eu/outgoing/attachments) ExchangeFailedEvent | RouteName: SAPSF-ONE-TIME-MIGRATION-18 | OriginatingUri: sftp://server.eu/outgoing/attachments?antInclude=*.pgp&consumer.bridgeErrorHandler=true&delay=20000&inProgressRepository=%23inProgressRepo-SAPSF-ONE-TIME-MIGRATION&knownHostsFile=%2Fhome%2Fjboss%2F.ssh%2Fknown_hosts&move=sent&onCompletionExceptionHandler=%23errorStatusOnCompletionExceptionHandler&password=xxxxxx&privateKeyFile=%2Fhome%2Fjboss%2F.ssh%2Fid_rsa&readLock=none&soTimeout=1800000&streamDownload=true&throwExceptionOnConnectFailed=true&username=account | completedWithoutException: false | toEndpoint:  | owner: [SAP] | sm9CI: [CI5328990] | priority: [Low] | BreadcrumbId: ID-system-linux-bank-com-42289-1580217016920-0-5929700 | exception: Cannot change directory to: ..

也许 soTimeout=1800000 太短了。手动 sftp 和 ls * 命令大约需要 20 分钟。

因为这是一次性行动。我用手动 sftp 解决了它。

标签: apache-cameljbossfuse

解决方案


推荐阅读