Announcement Announcement Module
Collapse
No announcement yet.
Issue with SFTP Adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with SFTP Adapter

    Hello,

    I am using Spring Integration to sftp files using the sftp outbound channel adapter . I am using DefaultSftpSessionFactory, it seems working but inconsistently, I keep getting this exception below from time to time

    2012-11-18 02:17:48,118 ERROR [task-scheduler-1] { } LoggingHandler | org.springframework.integration.MessageDeliveryExc eption: Error handling message for file [sales_data.csv]
    at org.springframework.integration.file.remote.handle r.FileTransferringMessageHandler.handleMessageInte rnal(FileTransferringMessageHandler.java:147)
    at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:73)
    at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :114)
    at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:1 01)
    at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:61)
    at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:157)
    at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:128)
    at org.springframework.integration.core.MessagingTemp late.doSend(MessagingTemplate.java:288)
    at org.springframework.integration.core.MessagingTemp late.send(MessagingTemplate.java:149)
    at org.springframework.integration.endpoint.SourcePol lingChannelAdapter.doPoll(SourcePollingChannelAdap ter.java:97)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :146)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :144)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller$1.run(AbstractPollingEndpoin t.java:207)
    at org.springframework.integration.util.ErrorHandling TaskExecutor$1.run(ErrorHandlingTaskExecutor.java: 52)
    at org.springframework.core.task.SyncTaskExecutor.exe cute(SyncTaskExecutor.java:48)
    at org.springframework.integration.util.ErrorHandling TaskExecutor.execute(ErrorHandlingTaskExecutor.jav a:49)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller.run(AbstractPollingEndpoint. java:202)
    at org.springframework.scheduling.support.DelegatingE rrorHandlingRunnable.run(DelegatingErrorHandlingRu nnable.java:51)
    at org.springframework.scheduling.concurrent.Reschedu lingRunnable.run(ReschedulingRunnable.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(ScheduledThreadPoolE xecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: org.springframework.integration.MessagingException : Failed to write to [sales_data.csv.writing] while uploading the file
    at org.springframework.integration.file.remote.handle r.FileTransferringMessageHandler.sendFileToRemoteD irectory(FileTransferringMessageHandler.java:227)
    at org.springframework.integration.file.remote.handle r.FileTransferringMessageHandler.handleMessageInte rnal(FileTransferringMessageHandler.java:136)
    ... 26 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.SftpS ession.write(SftpSession.java:109)
    at org.springframework.integration.file.remote.sessio n.CachingSessionFactory$CachedSession.write(Cachin gSessionFactory.java:147)
    at org.springframework.integration.file.remote.handle r.FileTransferringMessageHandler.sendFileToRemoteD irectory(FileTransferringMessageHandler.java:222)
    ... 27 more
    Caused by: 4: java.io.IOException: Pipe closed
    at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java: 638)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:4 95)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:4 54)
    at org.springframework.integration.sftp.session.SftpS ession.write(SftpSession.java:106)
    ... 29 more
    Caused by: java.io.IOException: Pipe closed
    at java.io.PipedInputStream.read(PipedInputStream.jav a:291)
    at com.jcraft.jsch.Channel$MyPipedInputStream.updateR eadSide(Channel.java:344)

    any clues? is this a bug ?

    Thanks

  • #2
    any clues? is this a bug ?
    Looks like the server (or network) is closing the connection. I don't believe it's a bug in Spring Integration.

    Comment


    • #3
      any idea why ?

      Comment


      • #4
        You would have to look at the logs on the server. If it's a network problem (failing switch or other component) it would be harder to figure out.

        Comment


        • #5
          does SI 2.1 supports retry ?

          Comment

          Working...
          X