none
TFS does not send email alert anymore. Email and SOAP subscription failures

    Question

  • Our TFS email alert is working until recently it suddenly stops for some reasons.

    Recently, we make an TFS Server plugin that sends out a custom email notification upon BuildCompletionEvent and we don't think it's related to this problem. We drop the plugin binaries onto TFS dev (bin\plugin) and the TFS out of the box email alert working as well as the custom one. However, tfs email alert does not work on TFS production but the custom email alert work.

    We follow the step as Grant Holliday describe here to display the error in the database and we get these errors

    "There were errors or warnings during notification delivery.    328/328 emails delivered.  11/419 soap notifications delivered.   408 errors.  0 warnings.    Set /Service/Integration/Settings/NotificationJobLogLevel in the TF registry to 2 to see errors and warnings.    "

    However, when we use the instructions further to update TFS registry for displaying more errors but we couldn't get more errors in the database.

    What else I can look to diagnose this problem?

    Thanks

    Tuesday, May 15, 2012 12:56 AM

All replies

  • Hello qarynquyen,

    Thanks for your post. However, for your issue I still feel a little confused, please kindly offer me more information about it:

    1). Do these TFS Alerts created in the Alert Explorer work?
    2). Please double check the Administration Console, make sure the Email Alert Setting is enabled.
    3). Take a look at the data in the tbl_EventNotification table of the Tfs_CollectionName database to see if there are any failed records.
    4). Also take a look at Event Viewer to see if there are some error messages.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, May 15, 2012 8:18 AM
    Moderator
  • Vicky, thanks for your reply.

    Here are more details:

    - Yes, all the alerts were setup using Alert Explorer. It all works in the past and suddenly, it stops working.

    - The Email Alert Setting is still enabled in Admin Console. I query tbl_EventNotification table and there are no records.

    - At first, we thought the problem comes from our plug in for BuildCompleteEvent but apparently, it's not.

    - Now, after we restart TFS box and use the command from Grant Holliday to set the TFS registry Notification alert to 2, we saw a few errors in the log but they do not give much more details.

    - Plus, we now realize all the sudden, some of the email alerts sent to us regarding to WorkItem changes or build failures, but they're more than 1 day behind after the events occur which is unacceptable.

    Are there other settings we can look or reset?

    For reference, here is the sample log in application event (Event ID 3000)

    TF53010: The following error has occurred in a Team Foundation component or extension:
    Date (UTC): 5/15/2012 9:43:43 PM
    Machine: (TFS server machine)
    Application Domain: TfsJobAgent.exe
    Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
    Service Host:
    Process Details:
      Process Name: TFSJobAgent
      Process Id: 1032
      Thread Id: 2748
      Account name: (service user)

    Detailed Message: TF271001: An error occurred while attempting to send an e-mail notification to the following address: XXX@YYY.com. Further e-mail notification errors that occur within the next five minutes might not be logged. Verify that the e-mail notification settings are correct in the Team Foundation Administration Console.
    Exception Message: Service not available, closing transmission channel. The server response was: 4.4.1 Connection timed out (type SmtpException)

    Exception Stack Trace:    at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)
       at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension.SendEmail(TeamFoundationRequestContext requestContext, TeamFoundationNotification notification)




    • Edited by garynguyen Tuesday, May 15, 2012 11:46 PM
    Tuesday, May 15, 2012 11:43 PM
  • Hello garynguyen,

    Please first make sure that the TFSJobAgent service is started. Open Services, and find the Visual Studio Team Foundation Background Job Agent service, make sure it is started.

    In addition, please add the following script in drver:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent\TfsJobAgent.exe.config:

    <system.net>
      <mailSettings>
        <smtp >
          <network host="smtpserver" port="26" >
        </smtp>
      </mailSettings>
    </system.net>

    For further information, please take a look at Ruiz's blog here: http://www.cnblogs.com/Ruiz/archive/2010/07/01/1769119.html

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 5:46 AM
    Moderator
  • Thanks Vicky,

    As the step you mention, yes, we already did verify and TFSJobService agent still running, all the function in TFS still working fine (version control, build, etc...). However, just only the piece that send out email doesn't work.

    The setting in webconfig is not needed right? Because all the sudden, the email starts working but its 1 day behind. Somehow the email queue so tight. Where else i can look into?

    As the error above, I have most concern about:

    Detailed Message: TF271001: An error occurred while attempting to send an e-mail notification to the following address: XXX@YYY.com. Further e-mail notification errors that occur within the next five minutes might not be logged. Verify that the e-mail notification settings are correct in the Team Foundation Administration Console.
    Exception Message: Service not available, closing transmission channel. The server response was: 4.4.1 Connection timed out (type SmtpException)

    Thursday, May 17, 2012 6:07 PM
  • Hello garynguyen,

    Until now, I think there should be nothing wrong with your TFS but your Exchange Server. And can you send out emails successfully through your Exchange Server?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 18, 2012 6:04 AM
    Moderator