Support Article
Email listener fails to start and gives AuthenticationFailed
Summary
User has upgraded the email server to MS Exchange 2010 and using the IMAP protocol for inbound processing. The Email Listener was not starting and throwing the following exception in the log files. The test connectivity works fine for both the outbound and the inbound email accounts. Screenshots as below.
Error Messages
Email listener logs (level : DEBUG):
Email listener logs (level : DEBUG):
11:05:23,003 [a.b.c.d-8380-1] ( SetLoggingLevel.Code_.Action) INFO abc|a.b.c.d ADMIN - Logging level for logger: com.pega.pegarules.integration.engine.internal.services.email.EmailListener has been set to: DEBUG by: ADMIN
11:05:59,907 [a.b.c.d-8380-6] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:05:59,908 [a.b.c.d-8380-7] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:05:59,910 [a.b.c.d-8380-2] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:05:59,981 [a.b.c.d-8380-5] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,285 [a.b.c.d-8380-2] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,287 [a.b.c.d-8380-6] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,290 [a.b.c.d-8380-7] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,456 [a.b.c.d-8380-5] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,550 [a.b.c.d-8380-7] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:00,725 [a.b.c.d-8380-6] (ices.util.MultiNodeSynchronize) ERROR - Error in establishing lock.
11:06:03,171 [a.b.c.d-8380-8] ( services.email.EmailListener) DEBUG - Using Email Account for Listener configuration
11:06:03,174 [a.b.c.d-8380-8] ( services.email.EmailListener) DEBUG - "Send As" address found on Listener cust
11:06:03,174 [a.b.c.d-8380-8] ( services.email.EmailListener) DEBUG - Configured to save the original email
11:06:08,243 [a.b.c.d-8380-8] (tener.ListenerStateManagerImpl) ERROR - Unexpected exception.
a.com.pega.pegarules.pub.PRException: Failed to establish outbound connection using Email Account 'cust.Notify'
From: (BED43609CDD45D2D0CF50A091987B3062:(MBean Access))
at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.setup(EmailListener.java:839)
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.launchListener(ListenerWrapper.java:139)
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startOneListener(ListenerStateManagerImpl.java:713)
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startListener(ListenerStateManagerImpl.java:618)
at com.pega.pegarules.management.internal.ListenerManagementAPI.Start(ListenerManagementAPI.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
...
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at javax.mail.Service.connect(Service.java:169)
at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.testConnectionToResponseServer(EmailListener.java:1668)
at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.setup(EmailListener.java:834)
... 65 more
When the Email Listener was started from SMA, following error was noticed -
Steps to Reproduce
In the Email Account try to give the IP address of SMTP 2010 Exchange Server and send email using this account . Email will not be sent out from system.
Root Cause
The reported issue was caused due to a defect in Pegasystems’ code or rules and same has been fixed. In the code, we check for the password, if it null or empty, then set the auth to false. So that it doesn't try to authenticate. Changes were done to SendEmailMessage function and also in the EmailListener.
Resolution
Provided HFIX-25837
Published March 18, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.