Я использую Spring-integration 2.1 с компонентом исходящего канала-адаптера SFTP для передачи файлов в удаленное местоположение. Intermittently, я получаю следующее исключение:Spring Integration - исключение «Pipe closed» с адаптером исходящего канала SFTP
Error handling message for file <file_name> _org.springframework.integration.MessageDeliveryException: Error handling message for file <file_name>
... stack was trimmed to be contained in a single post...
Caused by: org.springframework.integration.MessagingException: Failed to write to '<file_name>.writing' while uploading the file
at org.springframework.integration.file.remote.handler.FileTransferringMessageHandler.sendFileToRemoteDirectory(FileTransferringMessageHandler.java:227)
at org.springframework.integration.file.remote.handler.FileTransferringMessageHandler.handleMessageInternal(FileTransferringMessageHandler.java:136)
... 225 more
Caused by: org.springframework.core.NestedIOException: failed to write file; nested exception is 4: java.io.IOException: Pipe closed
at org.springframework.integration.sftp.session.SftpSession.write(SftpSession.java:109)
at org.springframework.integration.file.remote.session.CachingSessionFactory$CachedSession.write(CachingSessionFactory.java:147)
at org.springframework.integration.file.remote.handler.FileTransferringMessageHandler.sendFileToRemoteDirectory(FileTransferringMessageHandler.java:222)
... 226 more
Caused by: 4: java.io.IOException: Pipe closed
at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:623)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:480)
at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:439)
at org.springframework.integration.sftp.session.SftpSession.write(SftpSession.java:106)
... 228 more
Caused by: java.io.IOException: Pipe closed
at java.io.PipedInputStream.read(PipedInputStream.java:291)
at com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide(Channel.java:397)
at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:493)
... 231 more
Я видел сообщения, касающиеся такого рода ошибки, но не было никакого ответа.
Я полагаю, что SFTP-сервер завершает соединение из-за неактивности (базового тайм-аута), но почему Spring Integration не пытается установить новое соединение?