我们正在尝试使用Spring Integration配置SFTP Poller。以下(JSCH-0.1.45 + spring-integration-sftp-2.1.0.RELEASE.jar)在应用程序中使用。
我们正在低于错误。尝试了这个网站提供的很多解决方案,但没有解决这个问题。得到以下错误。让我们知道是否有人面临同样的问题,并提出任何解决方案。感谢。
[2/24/15 9:15:00:725 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Authentications that can continue: publickey,keyboard-interactive,password
[2/24/15 9:15:00:737 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Next authentication method: publickey
[2/24/15 9:15:00:749 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Authentications that can continue: keyboard-interactive,password
[2/24/15 9:15:00:757 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Next authentication method: keyboard-interactive
Jsch I org.springframework.integration.sftp.session.JschLogger log Disconnecting from x.xx.xxx.xx port 22
LoggingHandle E org.springframework.integration.handler.LoggingHandler `handleMessageInternal java.lang.IllegalStateException: failed to create SFTP Session at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:158)at org.springframework.integration.file.remote.session.CachingSessionFactory.doGetSession(CachingSessionFactory.java:98)at org.springframework.integration.file.remote.session.CachingSessionFactory.getSession(CachingSessionFactory.java:77)at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:143)at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizingMessageSource.receive(AbstractInboundFileSynchronizingMessageSource.java:144)at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:89)`
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:88)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:191)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:678)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:703)
at java.lang.Thread.run(Thread.java:811)
Caused by: java.lang.IllegalStateException: failed to connect
at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:186)
at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:154)
... 22 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:464)
at com.jcraft.jsch.Session.connect(Session.java:158)
at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:178)
Few more error logs are updated below, Connection is getting established.. but it is getting disconnected...
[2/24/15 10:35:00:014 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Connecting to 10.34.204.86 port 22
[2/24/15 10:35:00:054 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Connection established
[2/24/15 10:35:00:131 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Remote version string: SSH-2.0-OpenSSH_5.3
[2/24/15 10:35:00:140 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Local version string: SSH-2.0-JSCH-0.1.45
[2/24/15 10:35:00:152 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes
256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[2/24/15 10:35:00:164 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log aes256-ctr is not available.
[2/24/15 10:35:00:172 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log aes192-ctr is not available.
[2/24/15 10:35:00:184 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log aes256-cbc is not available.
[2/24/15 10:35:00:192 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log aes192-cbc is not available.
[2/24/15 10:35:00:200 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log arcfour256 is not available.
[2/24/15 10:35:00:212 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log CheckKexes: diffie-hellman-group14-sha1
[2/24/15 10:35:00:395 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_KEXINIT sent
[2/24/15 10:35:00:404 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_KEXINIT received
[2/24/15 10:35:00:416 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log kex: server->client aes128-ctr hmac-md5 none
[2/24/15 10:35:00:424 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log kex: client->server aes128-ctr hmac-md5 none
[2/24/15 10:35:00:454 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_KEXDH_INIT sent
[2/24/15 10:35:00:464 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log expecting SSH_MSG_KEXDH_REPLY
[2/24/15 10:35:00:504 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log ssh_rsa_verify: signature true
[2/24/15 10:35:00:512 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Host '10.34.204.86' is known and mathces the RSA h
ost key
[2/24/15 10:35:00:520 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_NEWKEYS sent
[2/24/15 10:35:00:532 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_NEWKEYS received
[2/24/15 10:35:00:541 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_SERVICE_REQUEST sent
[2/24/15 10:35:00:564 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log SSH_MSG_SERVICE_ACCEPT received
[2/24/15 10:35:00:746 GMT+00:00] 0000002d jsch I org.springframework.integration.sftp.session.JschLogger log Disconnecting from 10.34.204.86 port