LinkedIn
Copied!

SMTP0002: Connection reset while sending mail

Pega Predictive Diagnostic Cloud™ (PDC) creates an SMTP0002 event when an application connects to an SMTP server while sending emails, and the connection is interrupted.

Reason for the event

When Pega Platform™ connects to an SMTP server to send emails, but the connection is reset, Pega Platform generates a java.net.SocketException: Connection reset exception. PDC recognizes this exception and generates an SMTP0002 event and a corresponding case to track the occurrence of similar exceptions. You can receive a notification for each occurrence of this event.

Example message text

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:310)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)
2018-01-24 09:16:24,254 [jp-bio-8009-exec-680] [TS/$NewApp] [ SSTS:02.07.01] (arules.generated.tfnsw_default) ERROR 172.31.15.80|172.31.26.156 Pega_webservice - Unexpected exception caught while trying to send an email message.
javax.mail.MessagingException: Exception reading response; nested exception is:
java.net.SocketException: Connection reset at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2304)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2031)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
at javax.mail.Service.connect(Service.java:364)
at javax.mail.Service.connect(Service.java:245)
at com.pegarules.generated.SendEmailMessage_030101_ylD29e0oJGDaVFj4eWLqxg.SendEmailMessage03_01_01(SendEmailMessage_030101_ylD29e0oJGDaVFj4eWLqxg.java:715)
at com.pegarules.generated.SendEmailMessage_030101_ylD29e0oJGDaVFj4eWLqxg.invoke(SendEmailMessage_030101_ylD29e0oJGDaVFj4eWLqxg.java:87)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8954)
--
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:193)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:124)
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:89)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2284)

Recommended next steps

To resolve the issue with connection reset, contact the appropriate resources to check the status of the email server and the network connectivity between your application and your email server. When you are sure that connectivity and functionality have been restored, resolve the case in PDC.

Suggest Edit

Related Content

Have a question? Get answers now.

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