I have a situation where I have a sftp inbound channel pooling the remote sftp folder every 30 seconds. It has happened where I have gotten an exception when performing a directory list. When this happens the poller stops and I have to restart the application in order for the polller to start again. Is there a way for spring-integration to recover from such exceptions?
Attached is the stack trace:
Not sure what is going on with the VAOnce service but we had another problem this morning. We got the following error before 5am and it never pulled the files until I bounced the service:
2011-02-01 04:56:52,054 ERROR gov.va.vaonce.eip.handler.MessageHandler : EIP Process faiiled message
org.springframework.integration.MessagingException : Problem occurred while synchronizing remote to local directory
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizer.synchronize ToLocalDirectory(AbstractInboundFileSynchronizer.j ava:129)
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizingMessageSour ce.receive(AbstractInboundFileSynchronizingMessage Source.java:132)
at org.springframework.integration.endpoint.SourcePol lingChannelAdapter.doPoll(SourcePollingChannelAdap ter.java:89)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :116)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :114)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller$1.run(AbstractPollingEndpoin t.java:179)
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:174)
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:207)
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:619)
Caused by: java.io.IOException: Failed to list files
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:82)
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:42)
at org.springframework.integration.file.remote.sessio n.CachingSessionFactory$CachedSession.list(Caching SessionFactory.java:125)
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizer.synchronize ToLocalDirectory(AbstractInboundFileSynchronizer.j ava:118)
... 19 more
Caused by: 4:
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1751)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1758)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:11 96)
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:70)
... 22 more
Caused by: java.io.IOException: inputstream is closed
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java: 2327)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.jav a:2351)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1732)
... 25 more
2011-02-01 04:56:52,070 ERROR gov.va.vaonce.eip.handler.MessageHandler : org.springframework.integration.MessagingException : Problem occurred while synchronizing remote to local directory
2011-02-01 04:57:20,600 ERROR gov.va.vaonce.eip.handler.MessageHandler : EIP Process faiiled message
org.springframework.integration.MessagingException : Problem occurred while synchronizing remote to local directory
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizer.synchronize ToLocalDirectory(AbstractInboundFileSynchronizer.j ava:129)
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizingMessageSour ce.receive(AbstractInboundFileSynchronizingMessage Source.java:132)
at org.springframework.integration.endpoint.SourcePol lingChannelAdapter.doPoll(SourcePollingChannelAdap ter.java:89)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :116)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :114)
at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller$1.run(AbstractPollingEndpoin t.java:179)
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:174)
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:207)
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:619)
Caused by: java.io.IOException: Failed to list files
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:82)
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:42)
at org.springframework.integration.file.remote.sessio n.CachingSessionFactory$CachedSession.list(Caching SessionFactory.java:125)
at org.springframework.integration.file.remote.synchr onizer.AbstractInboundFileSynchronizer.synchronize ToLocalDirectory(AbstractInboundFileSynchronizer.j ava:118)
... 19 more
Caused by: 4:
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1751)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1758)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:11 96)
at org.springframework.integration.sftp.session.SftpS ession.list(SftpSession.java:70)
... 22 more
Caused by: java.io.IOException: inputstream is closed
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java: 2327)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.jav a:2351)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java :1732)
... 25 more
2011-02-01 04:57:20,616 ERROR gov.va.vaonce.eip.handler.MessageHandler : org.springframework.integration.MessagingException : Problem occurred while synchronizing remote to local directory


Reply With Quote
