Emails for feature branch builds not working


We’ve been using TeamCity for a while but decided to set it up for Feature Branches in GitFlow as per https://blogs.endjin.com/2013/04/a-step-by-step-guide-to-using-gitflow-with-teamcity-part-4-feature-branches-in-teamcity/.  Everything is working really well except email notifications.  

I was hoping to have it so that everyone gets notified if Development breaks, but only the person who checks into a Feature branch gets notified.  

Configuration for All Users, Email Notifier

  • Watching: Builds with my changes
  • Send notifications when
    • Build fails to start
    • Build fails (ignore failures not caused by my changes)
    • Build is probably hanging
    • Build is successful (only notify on the first success after failure)


But it would not send out the email.  All notifications from the Development branch work as expected, which has its own notification rule.  

  • Watching: Development
  • Send notifications when
    • Build fails to start
    • Build fails
    • Build is probably hanging
    • Build is successful (only notify on the first success after failure)


So the problem seems to be isolated to the Feature branches.  All of the users have been correctly setup with the Version Control Usernames and it shows them correctly in the history.

Other details that may be relevant:

  • TeamCity Professional 9.1.1 (build 37059)
  • We are running TeamCity in Azure using SQL Express
  • Tray notifier seems to be working just fine, even though the rules are identical
  • While trying to get this to work, at one point it was really strange where emails seem to be going to random people on the team and never the person who actually checked in the issue.  But I don’t have a reproducible case for it at this time.
5 comments
Comment actions Permalink

Hi Randar,

Could you please attach screenshot of configured Notification Rules?

0
Comment actions Permalink

Here you go.  I've attached the overall screen and then drilled down into the two rules for notifications.

These are the only rules and apply to the ALL_USERS_GROUP.



Attachment(s):
2015-10-06_14-09-34.png
2015-10-06_14-10-28.png
2015-10-06_14-08-49.png
0
Comment actions Permalink

Sorry for delay.
Could you please enable "debug-notifications" logging preset вon Administration->Diagnostics page, run the build for which the notification is not sent and attach the resulted log?

0
Comment actions Permalink

So I’ve been monitoring things and was going to wait a few days before responding, but the issue may have fixed itself.  Yesterday, I moved our Azure instance from a D1 to D2, which moves it to 2 procs and doubles the memory.  Not long after I did that, emails for feature branches started to work.  I am not sure if it’s because we’ve moved to a different server without SMTP issues, the reboot fixed it or just because we’re on a better server.

I won’t include the log here because there is some sensitive information in there, but I did find a number of these in the log.  Note: I’ve removed my email so I don’t get spam.

[2015-09-14 17:42:57,346]   INFO - n.email.EMailNotificatorConfig - Loading configuration file: T:\TeamCity\data\config\_notifications\email\email-config.xml

[2015-09-14 21:17:41,720]   WARN - ication.email.EMailNotificator - Failed to send email notification with subject '[TeamCity, FAILED] Build ClearEvent :: Development #10' to randar@notmyrealemail.com, error: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: mail, 25; timeout 60000;

  nested exception is:

                java.net.UnknownHostException: mail

So that sounds like a network issue to me where it couldn’t connect to SMTP.  So since it seems to be fixed, I will close this thread and re-open it if the issue comes back and does not look like a network problem.

Thanks for the help.

0
Comment actions Permalink

Hi Randar,

Thank you for the update. Please feel free to re-open the thread if the issue is reproduced.
BTW, if you need to send us some logs, you can make it privately via online form, email or FTP.

0

Please sign in to leave a comment.