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 fails to start and throws SocketTimeout Exception

SA-19137

Summary



After creating the Dynamic System Settings (DSS) for pop3 timeout setting, user has reported that their Email Listener does not start however on removing the DSS settings, the Email Listener starts successfully. Email Listener was failing with SocketTimeoutException in the Pega log file.

Error Messages



2016-02-02 10:14:26,648 [http-apr-8631-exec-6] [  STANDARD] [                    ] (ices.util.MultiNodeSynchronize) ERROR   - Error in establishing lock.
2016-02-02 10:17:42,488 [http-apr-8631-exec-2] [  STANDARD] [                    ] (tener.ListenerStateManagerImpl) ERROR   - Unexpected exception.
com.pega.pegarules.pub.PRException: Failed to establish outbound connection using Email Account 'Default.Notify'
From: (B0DF122C362D21E692754341F54278438:(MBean Access))
                at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.setup(EmailListener.java:825)
                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:57)
                 …

                at java.lang.Thread.run(Thread.java:722)
Caused by: javax.mail.MessagingException: Exception reading response;  nested exception is:
                java.net.SocketTimeoutException: Read timed out
                at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611)
                at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:936)
                at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:415)
                at javax.mail.Service.connect(Service.java:288)
                at javax.mail.Service.connect(Service.java:169)
                at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.testConnectionToResponseServer(EmailListener.java:1618)
                at com.pega.pegarules.integration.engine.internal.services.email.EmailListener.setup(EmailListener.java:820)
                ... 60 more
Caused by: java.net.SocketTimeoutException: Read timed out
                at java.net.SocketInputStream.socketRead0(Native Method)
                at java.net.SocketInputStream.read(SocketInputStream.java:150)
                at java.net.SocketInputStream.read(SocketInputStream.java:121)
                at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
                at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
                at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
                at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
                at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589)
                ... 66 more


Steps to Reproduce



- Create and configure Email Listener.
- Start the Email Listener from SMA.
- Email Listener fails with the above exception.


Root Cause



The issue is due to inappropriate timeout value configured in DSS. The default email timeout value is 60 seconds. 

Resolution



The email listener has started successfully on specifying appropriate/suitable timeout value in milliseconds rather than in seconds.

Appropriate timeout value can be configured using the following Dynamic System Setting (DSS). The value should be configured in milliseconds rather than seconds.

- Login to the PRPC and navigate to Rules Explorer ->SysAdmin ->Dynamic System Settings
- Right click on Dynamic System Settings, select New.
    o Owing ruleset     : Pega-IntSvcs
    o Setting Purpose : email/timeout
    o Value is seconds: 60000  # in milli seconds

Published February 9, 2016 - 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