NFA - Change the SMTP server port for sending watchdog emails
search cancel

NFA - Change the SMTP server port for sending watchdog emails

book

Article ID: 231972

calendar_today

Updated On:

Products

CA Network Flow Analysis (NetQos / NFA) DX NetOps

Issue/Introduction

- The reports/dashboards are being emailed successfully;

- However the watchdog alerts not. We have found the following error in the watchdog logs:

-------------------------------
11:24:43 2 - Globals - Error sending email :
Failure sending mail.
System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it xxx.xxx.xxx.xxx: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, Boolean async, GeneralAsyncDelegate asyncCallback)
   at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
   at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
   at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
   at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)
   at System.Net.Mail.SmtpClient.GetConnection()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- End of inner exception stack trace ---
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at WatchdogMain.Globals.fireMessage()
11:24:43 5 - MainWatchdogThread: Watchdog integrity cycle started
11:24:43 5 - Reporter Status: Starting validate
-------------------------------

The Watchdog is trying to use the SMTP port 25 (xxx.xxx.xxx.xxx:25).

We can see that the SMTP port is set in DB to the correct port (587):

mysql> select * from general;

+---------------------------+------------------------------+
| Attribute                 | Value                        |
+---------------------------+------------------------------+
| CachedDefinitionsChanged  | false                        |
| Email.Format              | HTML                         |
| EmailTemplatePath         | D:/CA/NFA/Reporter/xsl/email |
| ExportViewSessionCapacity | 20                           |
| ListTopCount              | 12                           |
| PieTopCount               | 12                           |
| PortalBasePath            | /ra                          |
| ReplyAddress              | [email protected]           |
| ReplyName                 | CA Network Flow Analysis     |
| Smtp.Host                 | mail.xxxx.corp                |
| Smtp.Password             | xxxxxxxx                |
| Smtp.Port                 | 587                          |
| Smtp.SSL                  | true                         |
| Smtp.User                 | gms-notifications            |
| StackedAreaTopCount       | 12                           |
| TopCount                  | 12                           |
| UtilizationAlert          | 75                           |
| UtilizationWarning        | 55                           |
| WebSite.Address           |                              |
| WebSite.Port              | 80                           |
| WebSite.SSL               | false                        |
+---------------------------+------------------------------+
21 rows in set (0.00 sec)
 
C:\Users\Administrator>telnet mail.xxxxx.corp 25
Connecting To mail.xxxxx.corp...Could not open connection to the host, on port 25: Connect failed
 

How to change the Watchdog Smtp.Port from 25 to 587?

Environment

Release : 21.2.8

Component : NETWORK FLOW ANALYSIS, DX NetOps Portal

Cause

In versions of NFA older than 21.2.8, the Watchdog ignored the SMTP port specified in the database and always used port 25.

Resolution

A fix for this issue is included in NFA 21.2.8 and up. In 21.2.8, you can specify the snmp port with:

mysql
use reporter

update general set value="25" where Attribute='Smtp.Port';

 

(specify the new SMTP port in place of 25)