捕获异常,由于Socket关闭而使主循环离开

时间:2018-12-06 19:49:42

标签: spring-boot spring-integration-sftp

无法将文件发送到SFTP服务器。我没有从下面的日志中找到确切的问题。使用 Spring集成SFTP配置将我的文件发送到客户端实例。我已引用此链接https://blog.pavelsklenar.com/spring-integration-sftp-upload-example/进行实施。我在这里做错了。任何帮助将不胜感激,谢谢。

下面是代码段

DefaultSftpSessionFactory factory = new DefaultSftpSessionFactory(true);
        factory.setHost(sftpHost);
        factory.setPort(sftpPort);
        factory.setUser(sftpUser);
        factory.setPassword(sftpPasword);
        factory.setAllowUnknownKeys(true);

请参阅下面的日志

    10-12-2018 03:03:22.261 [task-scheduler-1] INFO  org.springframework.integration.sftp.session.DefaultSftpSessionFactory.promptYesNo - The authenticity of host 'example.com' can't be established.
RSA key fingerprint is d1:e9:4e:64:a8:e5:19:46:7a:0e:79:2d:bf:27:cb:4c.
Are you sure you want to continue connecting?
10-12-2018 03:03:22.264 [task-scheduler-1] DEBUG org.springframework.integration.sftp.session.DefaultSftpSessionFactory.promptYesNo - No UserInfo provided - The authenticity of host 'example.com' can't be established.
RSA key fingerprint is d1:e9:4e:64:a8:e5:19:46:7a:0e:79:2d:bf:27:cb:4c.
Are you sure you want to continue connecting?, returning:true
10-12-2018 03:03:22.265 [task-scheduler-1] WARN  com.jcraft.jsch.log - Permanently added 'example.com' (RSA) to the list of known hosts.
10-12-2018 03:03:22.269 [task-scheduler-1] INFO  com.jcraft.jsch.log - SSH_MSG_NEWKEYS sent
10-12-2018 03:03:22.270 [task-scheduler-1] INFO  com.jcraft.jsch.log - SSH_MSG_NEWKEYS received
10-12-2018 03:03:22.280 [task-scheduler-1] INFO  com.jcraft.jsch.log - SSH_MSG_SERVICE_REQUEST sent
10-12-2018 03:03:22.306 [task-scheduler-1] INFO  com.jcraft.jsch.log - SSH_MSG_SERVICE_ACCEPT received
10-12-2018 03:03:22.308 [task-scheduler-1] DEBUG org.springframework.integration.sftp.session.DefaultSftpSessionFactory.showMessage - SSH Server supporting SFTP and SCP

10-12-2018 03:03:22.337 [task-scheduler-1] INFO  com.jcraft.jsch.log - Authentications that can continue: publickey,keyboard-interactive,password
10-12-2018 03:03:22.338 [task-scheduler-1] INFO  com.jcraft.jsch.log - Next authentication method: publickey
10-12-2018 03:03:22.342 [task-scheduler-1] INFO  com.jcraft.jsch.log - Authentications that can continue: keyboard-interactive,password
10-12-2018 03:03:22.349 [task-scheduler-1] INFO  com.jcraft.jsch.log - Next authentication method: keyboard-interactive
10-12-2018 03:03:22.425 [task-scheduler-1] INFO  com.jcraft.jsch.log - Authentication succeeded (keyboard-interactive).
10-12-2018 03:03:22.859 [task-scheduler-1] DEBUG org.springframework.integration.sftp.session.SftpSession.rename - File: CONVERGE_20181013.zip.writing was successfully renamed to CONVERGE_20181013.zip
10-12-2018 03:03:22.861 [task-scheduler-1] INFO  com.jcraft.jsch.log - Disconnecting from example.com port 22
10-12-2018 03:03:22.866 [Connect thread example.com session] INFO  com.jcraft.jsch.log - Caught an exception, leaving main loop due to Socket closed

0 个答案:

没有答案