[
https://issues.apache.org/jira/browse/NIFI-15782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070443#comment-18070443
]
Joel commented on NIFI-15782:
-----------------------------
I think I have a fix for this, I just need to do a rebase before I make a PR
> Reconnect to mail server on failure
> -----------------------------------
>
> Key: NIFI-15782
> URL: https://issues.apache.org/jira/browse/NIFI-15782
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 2.4.0
> Reporter: Joel
> Priority: Minor
> Labels: email
>
> The ConsumeIMAP (and most likely ConsumePOP3) processors enter a permanent
> failed state when the connection to the email server is interrupted (e.g.,
> network issues, server restarts, timeouts). These processors do not
> automatically recover from this state, requiring a full NiFi restart to
> resume email consumption.
> Bellow is one example of when the ConsumeIMAP enters the failed state:
> {{org.apache.nifi.processor.exception.ProcessException: Failed to receive
> messages from Email server: [jakarta.mail.StoreClosedException - * BYE
> Jakarta Mail Exception: java.io.IOException: Connection dropped by server?}}
> {{ at
> org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcessor.java:374)}}
> {{ at
> org.apache.nifi.processors.email.AbstractEmailProcessor.receiveMessage(AbstractEmailProcessor.java:426)}}
> {{ at
> org.apache.nifi.processors.email.AbstractEmailProcessor.onTrigger(AbstractEmailProcessor.java:235)}}
> {{ at
> org.apache.nifi.processors.email.ConsumeIMAP.onTrigger(ConsumeIMAP.java:31)}}
> {{ at
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)}}
> {{ at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1272)}}
> {{ at
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:244)}}
> {{ at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)}}
> {{ at
> org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105)}}
> {{ at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)}}
> {{ at
> java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)}}
> {{ at
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)}}
> {{ at java.base/java.lang.Thread.run(Thread.java:1583)}}
> {{Caused by: jakarta.mail.StoreClosedException: * BYE Jakarta Mail Exception:
> java.io.IOException: Connection dropped by server?}}
> {{ at
> org.eclipse.angus.mail.imap.IMAPFolder.throwClosedException(IMAPFolder.java:3740)}}
> {{ at
> org.eclipse.angus.mail.imap.IMAPFolder.doCommand(IMAPFolder.java:3874)}}
> {{ at
> org.eclipse.angus.mail.imap.IMAPFolder.exists(IMAPFolder.java:600)}}
> {{ at
> org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:361)}}
> {{ at
> org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:387)}}
> {{ at
> org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcessor.java:369)}}
> {{ ... 14 common frames omitted}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)