'System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions' error is seen while sending emails in TIBCO Spotfire Automation Services

'System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions' error is seen while sending emails in TIBCO Spotfire Automation Services

book

Article ID: KB0074612

calendar_today

Updated On:

Products Versions
Spotfire Automation Services 7.5 and higher

Description

While running TIBCO Spotfire Automation Services Job, "Send Email" task might fail with the following error.
 
FAILED: Task 2 'Send Email' failed with: Failed to send email using SMTP server 'mySMTPServer.test.com' from 'testServer@test.com' to 'testUser@test.com'.
Reason: System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException:
An attempt was made to access a socket in a way forbidden by its access permissions 1.678.234.89:25
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
at System.Net.PooledStream.Activate(Object owningObject

This error can be seen as a result of an anti-virus software blocking the SMTP service request that Spotfire Automation Services is using for email. It could also be due to SMTP communication not being allowed on the used port.

Issue/Introduction

The error "System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions" can be seen in the logswhile using the "Send Email" task in TIBCO Spotfire Automation Services due to anti-virus software blocking the SMTP service request that Spotfire Automation Services is using for sending emails..

Resolution

In this case, check with the IT/Security team to add an exception in the anti-virus scanning rules to allow SMTP request from the TIBCO Spotfire Node Manager machine where TIBCO Spotfire Automation Services is installed.