Member since
04-15-2020
14
Posts
2
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1571 | 06-26-2022 09:20 AM | |
2329 | 10-20-2020 06:03 AM |
12-06-2023
10:21 PM
Hi, I have a ConsumeIMAP processor downloading emails from office 365 mailbox using StandardOAuth2AccessTokenProvider. Here is a simple structure, consisting of few processors, including custom one. When testing various scenarios I also removed my custom processor to make sure my problem is not caused by this. The thing is, that when testing and starting ConnsumeIMAP via "run once" option, it works perfectly and it gives me my 10 emails as set in Fetch Size. But when I start processor using Start option so it uses cron frequency 2 minutes, it returns only one email and the rest only when I stop the ConsumeIMAP processor. I tried to schedule to 5, 10, 15 minutes, but without effect. Also tried for accesstokenprovider processor various setting in refresh window property from 0 s to 60 s, but also without any effect. Also, after some time, and only sometimes, I get Authentization fail error, see below. When I stop the processor and use "run once", it starts to work immediately as I already mentioned above. Asked IT to check logs on exchange server, but there is nothing. I'm a bit desperate by now, as I googled, chatgpted a lot, so you guy are my last chance before I get mad. Thanks for all suggestions you might have. Here are parameters of ConsumeIMAP and StandardOAuth2AccessTokenProvider: org.apache.nifi.processor.exception.ProcessException: Failed to receive messages from Email server: [javax.mail.AuthenticationFailedException - AUTHENTICATE failed. at org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcessor.java:386) at org.apache.nifi.processors.email.AbstractEmailProcessor.receiveMessage(AbstractEmailProcessor.java:439) at org.apache.nifi.processors.email.AbstractEmailProcessor.onTrigger(AbstractEmailProcessor.java:242) at org.apache.nifi.processors.email.ConsumeIMAP.onTrigger(ConsumeIMAP.java:32) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1361) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:247) at org.apache.nifi.controller.scheduling.QuartzSchedulingAgent$2.run(QuartzSchedulingAgent.java:130) at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: javax.mail.AuthenticationFailedException: AUTHENTICATE failed. at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:732) at javax.mail.Service.connect(Service.java:366) at javax.mail.Service.connect(Service.java:246) at javax.mail.Service.connect(Service.java:195) at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:334) at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:345) at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:373) at org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcessor.java:381)
... View more
Labels:
- Labels:
-
Apache NiFi
07-27-2023
10:03 AM
@Luwi I agree that it is likely not some kinda of quota and rather a connection interruption and since the default timeout in the smtp client is indefinite, the PutEmail processor will never timeout the bad connection and then execute a new thread to establish a new connection. The Jira (https://issues.apache.org/jira/browse/NIFI-9758) I mentioned in previous response provides the new capability to set smtp timeouts to resolve this issue. You'll need to upgrade to Apache NiFi 1.17 or newer to get this processor improvement. If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped. Thank you, Matt
... View more
07-08-2022
11:47 AM
@Luwi An "active content claim" would be any content claim where a FlowFile exist still referencing bytes of content in that claim. A NiFi content claim file can contain the content for 1 too many FlowFiles. So all it takes is one small FlowFile still queued in some connection anywhere on your NiFi canvas to prevent a content claim from being eligible to be moved to archive. This is why the total reported content queued on yoru canvas will never match the disk usage in your content_repository. This article is useful in understanding this process more: https://community.cloudera.com/t5/Community-Articles/Understanding-how-NiFi-s-Content-Repository-Archiving-works/ta-p/249418 Thank you, Matt
... View more
06-26-2022
02:17 PM
1 Kudo
@Luwi , please note that NiFi currently only supports Java 8 and 11. Cheers Andre
... View more
10-20-2020
06:03 AM
1 Kudo
ok, just figured it out. In the "content type" property of PutEmail, there must be charset defined as well, just like this: text/html;charset=utf-8
... View more
04-15-2020
12:55 PM
2 Kudos
You will need to get both the year and the month of the original date (because of the leap year considerations). In terms of how to accomplish this in NiFi one way is to use ExecuteScript processor and Python's calendar library with the function calendar.monthrange(year, month) that returns the last day of month as the second argument.
... View more