这个问题看起来很奇怪。在我们的prod服务器中,我们已经通过jsch建立了SFTP连接。使用服务器的authkey,它可以很好地工作到中午。由于身份验证失败,我们突然遇到了30分钟的问题。然后它又开始工作了。请给我建议。
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.lang.IllegalStateException: failed to create SFTP Session
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:343)
at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:209)
at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:199)
at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:193)
at org.springframework.integration.file.remote.handler.FileTransferringMessageHandler.handleMessageInternal(FileTransferringMessageHandler.java:110)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78)
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
... 10 more
Caused by: java.lang.IllegalStateException: failed to create SFTP Session
at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:355)
at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:49)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:332)
... 16 more
Caused by: java.lang.IllegalStateException: failed to connect
at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:272)
at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:350)
... 18 more
Caused by: com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 11 Too many bad authentication attempts!
at com.jcraft.jsch.Session.read(Session.java:987)
at com.jcraft.jsch.UserAuthPublicKey.start(UserAuthPublicKey.java:83)
at com.jcraft.jsch.Session.connect(Session.java:463)
at com.jcraft.jsch.Session.connect(Session.java:183)
at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:263)发布于 2018-11-20 00:33:29
最后,我们找出了问题的根本原因。看起来FileNet团队有接受无效凭据的阈值。当应用程序超过此无效尝试阈值时,它将丢弃SSH_MSG_DISCONNECT: 11 Too many bad authentication attempts!并保留接受新连接15或30分钟。
它看起来像是prod中的一个调度程序使用无效的凭据重复地通过独立程序命中FileNet。正因为如此,当Filenet由于其他程序导致的错误认证尝试超过阈值而无法接受新连接时,其他本应正常工作的程序间歇性地出错。
https://stackoverflow.com/questions/53346443
复制相似问题