EmailReader simply not working

Hi, I’m quite new to CloverDX and simply try to use an EmailReader but it doesn’t work.

I used the EmailReader | CloverDX 6.3.0 Documentation to create the job on a 6.2.0.14 Designer.

The job kind of starts but finishes with an error I just don’t understand.

17:14:36,450 INFO [WatchDog_80] ---------------------------------------------------------------------------------

17:14:36,450 INFO [WatchDog_80] EmailReader EMAIL_READER RUNNING

17:14:36,450 INFO [WatchDog_80] (alloc:0MB, cpu:0%) Out:0 0 0 0 0

17:14:36,450 INFO [WatchDog_80] FlatFileWriter FLAT_FILE_WRITER RUNNING

17:14:36,450 INFO [WatchDog_80] (alloc:0MB, cpu:0%) In:0 0 0 0 0

17:14:36,450 INFO [WatchDog_80] ---------------------------------** End of Log **--------------------------------

17:14:38,403 ERROR [WatchDog_80] Component [EmailReader:EMAIL_READER] finished with status ERROR. (Out1: 0 recs)

Component [EMAIL_READER:EmailReader] - Component pre-execute initialization failed.

javax.mail.MessagingException: Connection dropped by server?;

nested exception is:

java.io.IOException: Connection dropped by server?

17:14:38,403 ERROR [WatchDog_80] Error details:

org.jetel.exception.JetelRuntimeException: Component [EmailReader:EMAIL_READER] finished with status ERROR. (Out1: 0 recs)

at org.jetel.graph.Node.createNodeException(Node.java:673)

at org.jetel.graph.Node.run(Node.java:638)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:834)

Caused by: org.jetel.exception.ComponentNotReadyException: Component [EMAIL_READER:EmailReader] - Component pre-execute initialization failed.

at org.jetel.graph.Node.run(Node.java:573)

… 3 more

Caused by: org.jetel.exception.ComponentNotReadyException: javax.mail.MessagingException: Connection dropped by server?;

nested exception is:

java.io.IOException: Connection dropped by server?

at com.opensys.cloveretl.tools.g.preExecute(Main:145)

at com.opensys.cloveretl.component.EmailReader.preExecute(Main:434)

at org.jetel.graph.Node.run(Node.java:571)

… 3 more

Caused by: javax.mail.MessagingException: Connection dropped by server?;

nested exception is:

java.io.IOException: Connection dropped by server?

at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:742)

at javax.mail.Service.connect(Service.java:366)

at javax.mail.Service.connect(Service.java:246)

at javax.mail.Service.connect(Service.java:267)

at com.opensys.cloveretl.tools.g.gz(Main:209)

at com.opensys.cloveretl.tools.g.preExecute(Main:143)

… 5 more

Caused by: java.io.IOException: Connection dropped by server?

at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:119)

at com.sun.mail.iap.Response.(Response.java:133)

at com.sun.mail.imap.protocol.IMAPResponse.(IMAPResponse.java:60)

at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:412)

at com.sun.mail.iap.Protocol.(Protocol.java:141)

at com.sun.mail.imap.protocol.IMAPProtocol.(IMAPProtocol.java:131)

at com.sun.mail.imap.IMAPStore.newIMAPProtocol(IMAPStore.java:763)

at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:698)

… 10 more

Thank you for your input!

Best

Martin

Hi Martin,

The error message indicates that the server (Microsoft Office Outlook IMAP Server in this case) dropped the connection from the client (CloverDX). I dare to presume it was because you tried to connect by using SFA (single-factor authentication, i.e. username and password) which is not something Microsoft allows by default. As a matter of fact, SFA might already represent a deprecated option in the Microsoft cloud environment.

A recommended way to go here would be to create a valid OAuth2 connection (MFA - multi-factor authentication) to the Microsoft IMAP server (as described here: https://doc.cloverdx.com/latest/designer/oauth2-connections.html) and use that connection in the EmailReader component (“OAuth2 connection” property instead of “User Name” and “Password”).

If you stumble upon any issues while establishing a valid OAuth2 connection to Microsoft I’d suggest logging a ticket to CloverDX product support to get additional assistance.

With regards,

-Vladi