gpt4 book ai didi

java - ImapIdleChannelAdapter javax.mail.AuthenticationFailedException : [ALERT] Too many simultaneous connections

转载 作者:行者123 更新时间:2023-12-01 11:24:38 25 4
gpt4 key购买 nike

我有 spring 集成模块,其中配置了 imap-idle-channel-adapter

<mail:imap-idle-channel-adapter id="fetch-email-channel-adapter" store-uri="${common.mail.imapScheme}://${common.mail.imapHost}:${common.mail.imapPort}/INBOX"
channel="fetch-email-channel" should-delete-messages="false" should-mark-messages-as-read="true" authenticator="imapAuthenticator" auto-startup="${common.mail.autostart}"
error-channel="errorChannel" />

现在,当模块重新启动几次时,我收到以下错误

    [task-scheduler-9] WARN  [ImapIdleChannelAdapter] - error occurred in idle task
javax.mail.AuthenticationFailedException: [ALERT] Too many simultaneous connections. (Failure)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:665)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at org.springframework.integration.mail.AbstractMailReceiver.openSession(AbstractMailReceiver.java:203)
at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:208)
at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:105)
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:197)
at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:169)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2015-06-06 00:00:00,221 [task-scheduler-9] WARN [ImapIdleChannelAdapter] - Failed to execute IDLE task. Will attempt to resubmit in 10000 milliseconds.
java.lang.IllegalStateException: Failure in 'idle' task. Will resubmit.
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:216)
at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:169)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.mail.AuthenticationFailedException: [ALERT] Too many simultaneous connections. (Failure)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:665)
at javax.mail.Service.connect(Service.java:317)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at org.springframework.integration.mail.AbstractMailReceiver.openSession(AbstractMailReceiver.java:203)
at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:208)
at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:105)
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:197)
... 11 more

我找到了如何使用 Javamail api 关闭连接但如何使用 imap-idle-channel-adapter 来做到这一点

使用以下 spring 版本

spring-integration-mail : 2.2.3.RELEASE

最佳答案

我建议您升级到(较)新的版本,看看是否可以解决问题。 IMAP 邮件组件修复了多个错误。如果您无法升级到最新(4.1.5),我建议至少升级到3.0.7。

咨询migration guides以确定您可能需要考虑的任何更改。

关于java - ImapIdleChannelAdapter javax.mail.AuthenticationFailedException : [ALERT] Too many simultaneous connections,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30930402/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com