首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring - SFTP身份验证间歇性失败

Spring - SFTP身份验证间歇性失败
EN

Stack Overflow用户
提问于 2018-11-17 06:54:20
回答 1查看 854关注 0票数 0

这个问题看起来很奇怪。在我们的prod服务器中,我们已经通过jsch建立了SFTP连接。使用服务器的authkey,它可以很好地工作到中午。由于身份验证失败,我们突然遇到了30分钟的问题。然后它又开始工作了。请给我建议。

代码语言:javascript
复制
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)
EN

回答 1

Stack Overflow用户

发布于 2018-11-20 00:33:29

最后,我们找出了问题的根本原因。看起来FileNet团队有接受无效凭据的阈值。当应用程序超过此无效尝试阈值时,它将丢弃SSH_MSG_DISCONNECT: 11 Too many bad authentication attempts!并保留接受新连接15或30分钟。

它看起来像是prod中的一个调度程序使用无效的凭据重复地通过独立程序命中FileNet。正因为如此,当Filenet由于其他程序导致的错误认证尝试超过阈值而无法接受新连接时,其他本应正常工作的程序间歇性地出错。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53346443

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档