Email Listener throws exceptions while failing to start
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.
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!
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.
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.
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.
0% found this useful