Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Email Listener throws exceptions while failing to start

SA-14453

Summary



PRPC EmailListener processes incoming emails using IMAP protocol. Microsoft Exchange Server 2010 is the IMAP server.

Sporadically, the EmailListener fails to start OR when it starts, it halts after 5-10 minutes of running. In both cases, the same (nested) exception is observed in logs.

No issues were observed when using the 'Test Connection' button on the Outbound Email Rule setup.


Error Messages



2015-02-11 01:11:40,577 [fault (self-tuning)'] [ STANDARD] [ ] [ PegaRULES:07.10] ( services.email.EmailListener) ERROR EMAIL.xxxx.Listener TestUser - Caught exception while connecting to email server(s)
javax.mail.MessagingException: No login methods supported!;
nested exception is:
com.sun.mail.iap.ProtocolException: No login methods supported!
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:569)
at javax.mail.Service.connect(Service.java:288)
com.pega.pegarules.integration.engine.internal.services.email.EmailListener.emailConnect(EmailListener.java:2680)
[...]



STEPS TO REPRODUCE:

1. Configure 'OutBound Email' rule to connect to Microsoft Exchange Server 2010 IMAP. Test the connection.
2. Start the EmailListener. Observe that it fails to start (sporadically) or will run, but only for a short period and then halts.
3. Confirm the exception in the logs.

ROOT CAUSE:

Microsoft Exchange Server 2010 was a cluster of several nodes 'fronted' by a Hardware Load Balancer.
A small number of the nodes in the cluster were issuing the 'LOGINDISABLED' capability, preventing the EmailListener (which uses the JavaMail API) from connecting to these nodes.
It is important to note that the Load Balancer is not detectable by the EmailListener, it appears to be a single node from its perspective. 

The reason for the sporadic failure (rather than never-failing, or always-failing) was caused by the fact that only a small percentage of the nodes in the cluster were configured to issue the 'LOGINDISABLED' capability.

The EmailListener creates new IMAP (and SMTP in fact) connections every iteration and therefore provides the Load Balancer with the opportunity to route the request a different underlying node each time.

RESOLUTION:

1. Enable DEBUG logging on the EmailListener. This will also turn on JavaMail DEBUG logging (which goes to 'standard out') and recreate the issue.
2. Locate the log where the App Server writes 'Standard Out' (where JavaMail DEBUG goes) and cross-check with the PegaRules.logs (where the EmailListener DEBUG goes).
3. Confirm that the Exchange Server 2010 is issuing a 'LOGINDISABLED' in the cases where PRPC (Java Mail API in fact) report the exception above.
4. Re-configuring the Exchange Server 2010 so that no 'LOGINDISABLED' capability was shown to solve the issue.

Published October 1, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us