SEND_MAIL return code 2000142 | Connection timed out
search cancel

SEND_MAIL return code 2000142 | Connection timed out

book

Article ID: 279172

calendar_today

Updated On: 02-12-2024

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

When running a SEND_MAIL script function in 21.0 with the following script:

:  SET &EMAIL# = SEND_MAIL("email@example.com",,"Subject line here",&NOTIFICATION_TEXT#)
:  P &EMAIL#

The return code was simply:

0000000002000142

or 2000142

What is causing the problem?  This return code is not in the documentation.

Environment

Release: 21.0

Resolution

In looking at the JWP log, the follow messages appeared:

U00045014 Exception 'java.net.ConnectException: "Connection timed out (Connection timed out)"' at 'java.net.PlainSocketImpl.socketConnect()'.
U02000142 Unrecoverable I/O error found by Module/Function 'sendMail'. Error: 'java.net.ConnectException:Connection timed out (Connection timed out)'.
U00003434 Server routine  'JMailComponent/JMAIL' required '2' minutes and '10' seconds for processing.

The return code 2000142 is associated with the U02000142 code which appears to be a generic java I/O error code.  The error provides more information, in this case:

Connection timed out (Connection timed out)"' at 'java.net.PlainSocketImpl.socketConnect()

This was caused by a firewall rule that was blocking communication between the Automation Engine and the SMTP server.  Once the firewall was opened up, the connection was able to go through correctly.  In previous releases, this would be the same as return code 50012 "Timeout - SMTP Server '&02' did not answer within '&01' seconds" as explained in the documentation here: https://docs.automic.com/documentation/WEBHELP/English/all/components/DOCU/21.0.9/Automic%20Automation%20Guides/Content/Script/Reference/SEND_MAIL.htm

Additional Information

Broadcom is looking into why the previous return code did not show up - this is tracked in KB 279173