Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting notification for commits to repositories

Baztheman July 15, 2019 edited

Hi,

Can anyone tell me why I am not getting notification from commits to repository?

I have done the followings:

1. Set up a basic repository under a new project.

2. Added users to access the repository.

3. Tested the SMTP server by sending USER A a test email.

4. Checked and make sure email information of USER A is correct.

5. As USER A. Turned the watch on for "Pushes to all branches" and "Pull requests for all state changes" for repository Test.

4. As USER B. Edited a file and committed and pushed the changes.

5. I can see the changes in Bitbucket server repository browser page.

I am not seeing email notification to USER A. Am I missing anything here?

Thanks.

BarryScreen Shot 2019-07-16 at 2.18.34 PM.png Screen Shot 2019-07-16 at 2.18.43 PM.png

2 answers

1 vote
Baztheman July 18, 2019 edited

I looked at most of the related posts in here or other places. The issue is, most posts related to features that I do not see such as "Labs", "New source browser", ... They can be completely not related to my issue. Can anyone help? I am running out of ideas...

Michael Walker
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2019
Hi Barry,
My name is Michael and I'm with the DevTools support team here at Atlassian. Please let me jump in lend a hand. 
The first thing I'd like to ask if for you to enable debug logging in your environment, including the bitbucket.mail-log package, by running performing the following:
  1.  Explore to the admin panel (cog top right) and go to the "Logging and Profiling" and enable debug logging.
  2. Run the following call to enable debug logging on bitbucket.mail-log (updating the username and URL)
  3. curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/bitbucket.mail-log/debug

Once both are enabled, make sure you use a different user, than the one "watching" the repo in question, to push a commit and make a change in a PR. You can either double back and check your logs or potentially tail your logs to look for any errors.

Do note that a user will not generate any notifications to themselves so as long as you are using a separate user, we should see messages appearing in both your $BITBUCKET_HOME/log/atlassian-bitbucket.log and your $BITBUCKET_HOME/log/atlassian-bitbucket-mail.log.

Please let me know if you see any errors, or lack there of. In the meantime, I will be running some tests internally to confirm the functionality on v6.3.2.

Baztheman July 19, 2019 edited

@Michael Walker Thanks for jumping in and help. Here are the comment and results:

1. By adding debug option in http://bitbucket/admin/logging page as instructed did not change /var/atlassian/application-data/bitbucket/shared/bitbucket.properties. Restarted BB server still no change to the file.

2. I have to manually add the following lines as instructed:

logging.logger.ROOT=DEBUG
logging.logger.com.atlassian.bitbucket=DEBUG

3. Restart the server in case it is required.

4. Edit, commit and push the README.txt with username jenkins_builder (with different email).

5. User b.ay with "watching" in test repo can see the new pushed changes.

6. No email notification to b.ay

7. I went to http://bitbucket/admin/mail-server, sent a test email. It went through to my inbox. However, no new entry in the atlassian-bitbucket-mail.log. Am I setting the mail server correctly?

I have attached the log files. The commit is "test9 by jenkins_builder user after changing its email address." if you need to search in the log file.

Opps, there is no way for me to include text files here?

Thank you.

Barry

atlbitbucket@bitbucket:~$ tail  -f log/atlassian-bitbucket-mail.log

2019-07-19 10:41:58,503 INFO  [Thread-4]  bitbucket.mail-log Shutting down mail service

2019-07-19 10:42:37,665 INFO  [spring-startup]  bitbucket.mail-log Starting mail service

2019-07-19 11:00:51,292 INFO  [hz.hazelcast.event-1]  bitbucket.mail-log Switching to log level [debug]

2019-07-19 11:42:54,623 INFO  [Thread-4]  bitbucket.mail-log Shutting down mail service

2019-07-19 11:45:32,749 INFO  [spring-startup]  bitbucket.mail-log Starting mail service

 

Screen Shot 2019-07-19 at 12.15.35 PM.png

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2019

Hello Barry,

Thank you for explaining your issue along with detailing the steps into the problem you’re having. From what I’m understanding, within your steps, the user it making a commit and not pushing anything to the repo. This action will not trigger a notification as the commit will either take place locally prior to pushing to Bitbucket.

A similar post can also help to explain what would be needed to configure notifications. This post may be found at  How can I enable email notifications on commit?

Additional resources which may help to understand the workflows may be found at Comparing Workflows.

I hope this information proves helpful and you’re able to sort out your notifications.

Regards,
Stephen Sifers

Baztheman July 16, 2019 edited

Stephen, thank you for your reply. It was my typos. I missed in the description that I did "push" and I can see the changes in the bitbucket browser. Also included two screenshots so you can see the setups.

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 16, 2019

Hello Barry,

Thank you for the clarification and correction.

It seems like you’ve made all the correct steps and changed for notifications to be sent. With this said, we should check to ensure the mail is leaving your Bitbucket server and attempting delivery. I would ask for you to check your mail server to see if the mail is leaving the Bitbucket server in an attempt to be delivered. If mail is coming through via the test method, as you configured, then mail for notifications should also be working.

Additionally, the notifications may be batched. 

By default, repository notifications are batched. You can change your personal account settings (on the Notification settings tab) so that you get all repository notifications immediately.

Source documentation: Repository notifications and Notifications.

Regards,
Stephen Sifers

Baztheman July 16, 2019

@Stephen Sifers 

"I would ask for you to check your mail server to see if the mail is leaving the Bitbucket server in an attempt to be delivered."

BARRY> How?

"If mail is coming through via the test method, as you configured, then mail for notifications should also be working."

BARRY> Yes I received the test email to my mailbox just fine.

"By default, repository notifications are batched"

BARRY> I checked the documentation. The default is 30 minutes. We are way beyond 30 minutes. So it is not the issue.

I am at lost right now. It must be something so simple that we have overlooked.

Baztheman July 18, 2019

@Stephen Sifers is it possible to help me to run through some tests to find out the issues? I suspect is something simple that I have not configured. Thanks. Barry

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events