TIBCO Spotfire Automation job (send email) task may fail with error "The operation has timed out. at System.Net.Mail.SmtpClient.Send"

TIBCO Spotfire Automation job (send email) task may fail with error "The operation has timed out. at System.Net.Mail.SmtpClient.Send"

book

Article ID: KB0075111

calendar_today

Updated On:

Products Versions
Spotfire Automation Services 7.5 and higher

Description

You may see the below error when executing a "send email" task through Automation services.. The below error can be found in the automation services log "<installation folder>\tsnm\10.X.0\nm\logs\Spotfire.Dxp.Worker.Host.Debug.xxxxxxxxxxxxxxxxxxxxxxxx.log"

-------------------------------------------------------------
Task 3 'Send Email' failed with: Failed to send email using SMTP server 'mail.xxxxx.com' from 'abc@xyz.com' to 'efg@lnm.com'. Reason: System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Spotfire.Dxp.Automation.Tasks.Tasks.SendEmail.SendTheMail(TaskExecutionContext context, String smtpHost, String fromAddress, String messageBody, AttachmentsInfo attachmentsInfo)
-------------------------------------------------------------

These issues are environment specific and may be seen in cases when the SMTP server or the Automation server (node manager) is busy.

Issue/Introduction

TIBCO Spotfire Automation job (send email) task may fail with error "The operation has timed out. at System.Net.Mail.SmtpClient.Send"

Environment

All supported operating systems

Resolution

- Export the Automation services configuration using the "export-service-config" command.
https://docs.tibco.com/pub/spotfire_server/10.3.9/doc/html/TIB_sfire_server_tsas_admin_help/GUID-5462A06E-20CC-4F42-BCB8-0A66C8EC1C18.html

- The configuration is exported to "<installation folder>\10.X.0\tomcat\spotfire-bin\config\root" on the Spotfire Server machine.
- Edit " Spotfire.Dxp.Worker.Automation.config" file

The default SMTP send timeout in "Spotfire.Dxp.Worker.Automation.config" is 100
 (<smtp port="25" useTls="false" timeoutSeconds="100">)
User-added image


- Try increasing it to "200" seconds and check the behavior..       (In this example it is set to 200. This value can be tweaked as per the requirement.)

- Save the file and import the configuration back to the database using (import-service-config)
https://docs.tibco.com/pub/spotfire_server/10.3.9/doc/html/TIB_sfire_server_tsas_admin_help/GUID-6D37ADC8-824A-4FC6-9028-94A0CB0061B5.html

- "Navigate to Spotfire Servers Administration Page > "Nodes & Services", select the Automation Service and update it with new configuration