email notification testing

3,475 views
Skip to first unread message

ffa

unread,
Jul 19, 2012, 7:32:14 PM7/19/12
to repo-d...@googlegroups.com
Hi,

 I'm not receiving emails. How can I debug email notifications? I tried searching for anything related to verbose debugging or a test email button, but I only found a discussion thread which didn't have a solution I could use.

Magnus Bäck

unread,
Jul 19, 2012, 8:48:29 PM7/19/12
to ffa, repo-d...@googlegroups.com
On Thu, Jul 19, 2012 at 7:32 PM,
    ffa <ako...@mindboxstudios.com> wrote:
 
 I'm not receiving emails. How can I debug email notifications? I tried searching for anything related to verbose debugging or a test email button, but I only found a discussion thread which didn't have a solution I could use.

Have you looked in the error log? Which version of Gerrit are you running? For a while email problems weren't reported properly, but I don't remember which public releases (if any) that were affected by this.

-- 
Magnus Bäck

Adam Kohan

unread,
Jul 20, 2012, 2:41:51 AM7/20/12
to repo-d...@googlegroups.com
> Have you looked in the error log? Which version of Gerrit are you running?
> For a while email problems weren't reported properly, but I don't remember
> which public releases (if any) that were affected by this.

yes, and it does not contain mail related errors. 2.4.2.

I really wish a test email button existed.

Saša Živkov

unread,
Jul 20, 2012, 4:04:25 AM7/20/12
to Adam Kohan, repo-d...@googlegroups.com
Have you checked the logs of the smtp server you configured in gerrit.config
under the sendemail.smtpServer?
Maybe Gerrit properly passes emails to the smtp server but the server itself
has a problem?

Saša

>
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en

Emmanuel Grumbach

unread,
Jul 20, 2012, 6:33:27 AM7/20/12
to Saša Živkov, Adam Kohan, repo-d...@googlegroups.com
Also, don't you receive mail at all, or sometimes you receive mails
but not all the mails you expected?
I once had an issue that ended up to be because of bad configuration
of the groups:
the "Send email notifications about comments and actions by users in
this group only..." checkbox was checked...

Adam Kohan

unread,
Jul 25, 2012, 11:30:56 PM7/25/12
to Emmanuel Grumbach, Saša Živkov, repo-d...@googlegroups.com
>> Have you checked the logs of the smtp server you configured in gerrit.config
>> under the sendemail.smtpServer?
>> Maybe Gerrit properly passes emails to the smtp server but the server itself
>> has a problem?

I'm using google apps gmail.

> Also, don't you receive mail at all, or sometimes you receive mails
> but not all the mails you expected?
> I once had an issue that ended up to be because of bad configuration
> of the groups:
> the "Send email notifications about comments and actions by users in
> this group only..." checkbox was checked...

I don't see that checkbox.


under "/etc/mail/", I see a bunch of templates with a ".example"
suffix. Do I need to remove ".example" from the files? I assumed
gerrit would just use the default either way.

Adam Kohan

unread,
Jul 25, 2012, 11:54:14 PM7/25/12
to Emmanuel Grumbach, Saša Živkov, repo-d...@googlegroups.com
Also, here is my mail config.

[sendemail]
enable = true
from = MIXED
smtpServer = smtp.gmail.com
smtpServerPort = 587
smtpEncryption = TLS
smtpUser = <the email address gerrit will use>

Edwin Kempin

unread,
Jul 26, 2012, 2:11:03 AM7/26/12
to Adam Kohan, Emmanuel Grumbach, Saša Živkov, repo-d...@googlegroups.com


2012/7/26 Adam Kohan <ako...@mindboxstudios.com>

Also, here is my mail config.

[sendemail]
        enable = true
        from = MIXED
        smtpServer = smtp.gmail.com
        smtpServerPort = 587
        smtpEncryption = TLS
        smtpUser = <the email address gerrit will use>


On Wed, Jul 25, 2012 at 8:30 PM, Adam Kohan <ako...@mindboxstudios.com> wrote:
>>> Have you checked the logs of the smtp server you configured in gerrit.config
>>> under the sendemail.smtpServer?
>>> Maybe Gerrit properly passes emails to the smtp server but the server itself
>>> has a problem?
>
> I'm using google apps gmail.
>
>> Also, don't you receive mail at all, or sometimes you receive mails
>> but not all the mails you expected?
>> I once had an issue that ended up to be  because of bad configuration
>> of the groups:
>> the "Send email notifications about comments and actions by users in
>> this group only..." checkbox was checked...
>
> I don't see that checkbox.
This checkbox was removed, it is replaced by the 'Email Reviewers' global capability [1]
that can be assigned on the 'All-Projects' project.

[1] https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_emailReviewers

 

Edwin Kempin

unread,
Jul 26, 2012, 2:12:28 AM7/26/12
to Adam Kohan, Emmanuel Grumbach, Saša Živkov, repo-d...@googlegroups.com


2012/7/26 Edwin Kempin <edwin....@gmail.com>
Yes, you only need to touch and rename these file if you want to customize the templates.
 

Adam Kohan

unread,
Jul 26, 2012, 5:33:44 AM7/26/12
to Edwin Kempin, Emmanuel Grumbach, Saša Živkov, repo-d...@googlegroups.com
>> This checkbox was removed, it is replaced by the 'Email Reviewers' global
>> capability [1]
>> that can be assigned on the 'All-Projects' project.
>>
>> [1]
>> https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_emailReviewers

okay, I set that to allow for all registered users. But, I doubt that
was the problem. I'll see what happens with that since I can't really
test it out.

would my permissions be apart of the problem? I set up a "read" deny
on the "All Projects" project's "refs/*" ref for "Registered Users"
and "Anonymous Users".

Also, I compiled my version. Is it possible the compilation skipped
this feature?

Finally, is there verbose debugging? I will recompile if I have to
because this is driving me batty.

Björn Pedersen

unread,
Jul 26, 2012, 9:41:30 AM7/26/12
to repo-d...@googlegroups.com, Emmanuel Grumbach, Saša Živkov


Am Donnerstag, 26. Juli 2012 05:54:14 UTC+2 schrieb ffa:
Also, here is my mail config.

[sendemail]
        enable = true
        from = MIXED
        smtpServer = smtp.gmail.com
        smtpServerPort = 587
        smtpEncryption = TLS
        smtpUser = <the email address gerrit will use>
                           ^^^^^^ is this a gmail login address?
  You have to use a gmail address that can log in to gmail (and also provide the password here).                
 

Björn Pedersen

unread,
Jul 26, 2012, 9:44:06 AM7/26/12
to repo-d...@googlegroups.com, Emmanuel Grumbach, Saša Živkov

ffa

unread,
Jul 26, 2012, 3:11:02 PM7/26/12
to repo-d...@googlegroups.com, Emmanuel Grumbach, Saša Živkov
Yes, it is a gmail google apps email address. And, my password is in the secure config file. Also, wouldn't I get some type of error in my error log if gerrit couldn't login? There must be someway to turn on verbose debugging.

ffa

unread,
Jul 28, 2012, 12:01:56 AM7/28/12
to repo-d...@googlegroups.com, Emmanuel Grumbach, Saša Živkov
wooohoooo, I finally got some errors. Please help me debug.

[2012-07-27 19:06:57,256] ERROR com.google.gerrit.server.git.ReceiveCommits : Cannot send email for new patch set 16,4
com.google.gerrit.server.mail.EmailException: Connection closed without indication.
        at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:264)
        at com.google.gerrit.server.mail.SmtpEmailSender.send(SmtpEmailSender.java:161)
        at com.google.gerrit.server.mail.OutgoingEmail.send(OutgoingEmail.java:125)
        at com.google.gerrit.server.git.ReceiveCommits$4.run(ReceiveCommits.java:1515)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at com.google.gerrit.server.util.RequestScopePropagator$1.call(RequestScopePropagator.java:86)
        at com.google.gerrit.server.util.ThreadLocalRequestScopePropagator$1.call(ThreadLocalRequestScopePropagator.java:58)
        at com.google.gerrit.server.util.RequestScopePropagator$2.call(RequestScopePropagator.java:96)
        at com.google.gerrit.server.util.RequestScopePropagator$4.run(RequestScopePropagator.java:161)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:333)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.apache.commons.net.smtp.SMTPConnectionClosedException: Connection closed without indication.
        at org.apache.commons.net.smtp.SMTP.__getReply(SMTP.java:182)
        at org.apache.commons.net.smtp.SMTP.__sendCommand(SMTP.java:162)
        at org.apache.commons.net.smtp.SMTP.sendCommand(SMTP.java:318)
        at org.apache.commons.net.smtp.AuthSMTPClient.login(AuthSMTPClient.java:77)
        at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:247)
        ... 17 more


my gerrit.config:

[sendemail]
        enable = true
        from = MIXED
        smtpServer = smtp.gmail.com
        smtpServerPort = 587
        smtpEncryption = TLS
        smtpUser = <gmail email address>

my secure.config: 

[sendemail]
        smtpPass = <gmail password>

ffa

unread,
Aug 2, 2012, 5:26:43 AM8/2/12
to repo-d...@googlegroups.com, Emmanuel Grumbach, Saša Živkov
Yep, I tried that recently and it worked. Thank you.

On Wednesday, August 1, 2012 7:16:35 PM UTC-7, Graham Haworth wrote:
Are you still having trouble? I never was able to get an exception out of it but my configuration looked exactly like the one you posted earlier. I fixed it by changing the smtpEncryption to ssl (lower-case, not sure if that matters).

I hope this helps!
Reply all
Reply to author
Forward
0 new messages