E-mail notifcation not working

buttonbjbuttonbj Posts: 11
edited October 25, 2012 10:50AM in SQL Backup Previous Versions
Hello everyone,

We have SQL Backup 7.2 installed on our server and when we run the backup job, no notification gets sent to any of the recipients. The error we receive is: Warning 151: MAILTO error: Failed to send mail. (Socket Error # 10060 Connection timed out.)

When I check the server options and go to the Email Setting tab, everything is setup correctly there. When I hit the "Send a Test Email..." button, I receive a "Socket Error #10060 Connection timed out." error message. If I hit the "Send a Test Email..." a second or third time though, the e-mail sends. If I wait five minutes and hit the "Send a Test Email..." button again, I receive the "Socket Error #10060 Connection timed out." error once again. If I change e-mail servers, the same thing happens. Has anyone ever ran into this? Or can anyone explain exactly how an e-mail notification is sent from SQL Backup so I can try and pinpoint where the issue is happening or see if something is shutting a service down? Thank you in advance.

-Brandon

Comments

  • peteypetey Posts: 2,358 New member
    SQL Backup sends e-mails out by connecting to your designated SMTP server and sending the message out. The default connection timeout value is 30 seconds. The timeout error suggests that SQL Backup is having problems connecting to the SMTP server within 30 seconds.

    You could increase the timeout value by making a change in SQL Backup's registry settings:

    - open the registry
    - look for HKEY_LOCAL_MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\<instance name>
    - add a new DWORD value named 'ConnectionTimeout', and enter the timeout value in milliseconds e.g. for a timeout value of 1 minute, enter 60000
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Thank you for your reply. I went on our server and added the DWORD as mentioned in the previous post. This did not work. I tried multiple values (1 minute, 6 minutes, and others), restarted the service and the cluster resource, but nothing seems to work. When I kick off the job, the job ends in 24 seconds with the same error message. It's seems like SQL Backup is ignoring the new registry value. I forgot to mention that this is a clustered environment too...
  • peteypetey Posts: 2,358 New member
    My apologies, I wrongly assumed that you were hitting the SQL Backup SMTP timeout. It looks like you're hitting the default operating system timeout for TCP/IP connections, which is around 20 seconds. See this link for details on how to increase the timeout value using the TcpMaxConnectRetransmissions value.

    Do you know if the network adapter is overloaded, either on the SQL Server box, or on the SMTP server, hence causing the timeout to occur?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Could you send that link again? It doesn't seem to be in your post. The network adapters are definitely not overloaded on either the SQL box or the SMTP server. I have verified this. Thank you!
  • peteypetey Posts: 2,358 New member
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Thank you for the reply and sorry for the late post. This does not seem to work either. No matter what value I use for the TcpMaxConnectRetransmissions value, it doesn't change my results. If this helps anyone, I am using this on Windows Server 2008 R2.
  • If I have to guess, you are probably having a different issue that has nothing to do with SQL Backup.

    The first thing you need to do is verify that you can connect to the SMTP server from the SQL box. Have you done this with say... Putty or the Telnet command connecting to port 25 on the SMTP server?

    http://technet.microsoft.com/en-us/libr ... v=exchg.65).aspx

    If the test fails, then you need to start your troubleshooting there and take SQL Backup out of the equation.

    It could be the Windows Firewall on either server blocking the connection, or a setting on the SMTP service not allowing relaying or a network device in the path not allowing the connection.
Sign In or Register to comment.