Mail Error: SMTP server rejected auth: 220

1,206 views
Skip to first unread message

Poppy Lei

unread,
Jun 20, 2017, 2:08:57 PM6/20/17
to Repo and Gerrit Discussion
The Gerrit server suddenly not able to send out email(comment, review, merge) to users. It did not happen consistently, but intermittently.

Here is the error in error.log:

[2017-06-20 10:53:15,201] [WorkQueue-1] ERROR com.google.gerrit.server.change.PostReviewers : Cannot send email to new reviewers of change 3241
com.google.gerrit.common.errors.EmailException: Mail Error: SMTP server rejected auth: 220 smtp.fortinet.com ESMTP Smtpd; Tue, 20 Jun 2017 10:53:14 -0700

at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:277)
at com.google.gerrit.server.mail.SmtpEmailSender.send(SmtpEmailSender.java:174)
at com.google.gerrit.server.mail.OutgoingEmail.send(OutgoingEmail.java:153)
at com.google.gerrit.server.change.PostReviewers.emailReviewers(PostReviewers.java:400)
at com.google.gerrit.server.change.PostReviewers.access$600(PostReviewers.java:78)
at com.google.gerrit.server.change.PostReviewers$Op.postUpdate(PostReviewers.java:356)
at com.google.gerrit.server.git.BatchUpdate.executePostOps(BatchUpdate.java:1052)
at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:452)
at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:649)
at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:644)
at com.google.gerrit.server.change.PostReviewers.apply(PostReviewers.java:156)
at com.googlesource.gerrit.plugins.reviewersbyblame.ReviewersByBlame.addReviewers(ReviewersByBlame.java:143)
at com.googlesource.gerrit.plugins.reviewersbyblame.ReviewersByBlame.run(ReviewersByBlame.java:127)
at com.googlesource.gerrit.plugins.reviewersbyblame.ChangeUpdatedListener$1.run(ChangeUpdatedListener.java:175)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:417)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2017-06-20 10:55:03,282] [SendEmail-1] ERROR com.google.gerrit.server.change.EmailReviewComments : Cannot email comments for 3191,3
com.google.gerrit.common.errors.EmailException: Mail Error: SMTP server rejected auth: 220 smtp.fortinet.com ESMTP Smtpd; Tue, 20 Jun 2017 10:55:03 -0700

at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:277)
at com.google.gerrit.server.mail.SmtpEmailSender.send(SmtpEmailSender.java:174)
at com.google.gerrit.server.mail.OutgoingEmail.send(OutgoingEmail.java:153)
at com.google.gerrit.server.change.EmailReviewComments.run(EmailReviewComments.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:417)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


Here is the gerrit.config:

[auth]
        type = LDAP
        gitBasicAuth = true
[ldap]
        server = ldaps://ldapserver.com:636
        username = uid=user_name,cn=users,cn=accounts
        password = password
        accountbase = cn=users,cn=accounts
        referral = follow
        groupBase = cn=users,cn=accounts

        gitBasicAuth = true
[receive]
enableSignedPush = true
[sendemail]
  smtpServer = my.mail.com
        smtpEncryption = SSL
        smtpUser = user_name
        smtpPass = password

[container]
user = gerrit2
javaHome = /opt/jdk1.8.0_101/jre
heapLimit = 16g
[sshd]
listenAddress = *:29418
batchThreads = 4
commandStartThreads = 3

[httpd]
listenUrl = http://*:8080/
maxThreads = 50
[cache]
directory = cache

I am able to telnet the mail server( port 25 and port 465), got status 220 as well.
Can someone help with the issue, thanks in advance.


Regards,
Lei

Saša Živkov

unread,
Jun 20, 2017, 4:57:33 PM6/20/17
to Poppy Lei, Repo and Gerrit Discussion
On Tue, Jun 20, 2017 at 8:08 PM, Poppy Lei <poppy...@gmail.com> wrote:
The Gerrit server suddenly not able to send out email(comment, review, merge) to users. It did not happen consistently, but intermittently.

Here is the error in error.log:

[2017-06-20 10:53:15,201] [WorkQueue-1] ERROR com.google.gerrit.server.change.PostReviewers : Cannot send email to new reviewers of change 3241
com.google.gerrit.common.errors.EmailException: Mail Error: SMTP server rejected auth: 220 smtp.fortinet.com ESMTP Smtpd; Tue, 20 Jun 2017 10:53:14 -0700

Obviously, you have to check why is your SMTP server rejecting the authentication.
This doesn't look like a Gerrit issue.


Regards,
Lei

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

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Magnus Bäck

unread,
Jun 21, 2017, 2:29:31 AM6/21/17
to Saša Živkov, Poppy Lei, Repo and Gerrit Discussion
On Tuesday, June 20, 2017 at 22:56 CEST,
Saša Živkov <ziv...@gmail.com> wrote:

> On Tue, Jun 20, 2017 at 8:08 PM, Poppy Lei <poppy...@gmail.com>
> wrote:
>
> > The Gerrit server suddenly not able to send out email(comment,
> > review, merge) to users. It did not happen consistently, but
> > intermittently.
> > Here is the error in error.log:
> > [2017-06-20 10:53:15,201] [WorkQueue-1] ERROR com.google.gerrit.server.
> > change.PostReviewers : Cannot send email to new reviewers of change
> > 3241
> > com.google.gerrit.common.errors.EmailException: Mail Error: SMTP
> > server rejected auth: 220 smtp.fortinet.com ESMTP Smtpd; Tue, 20 Jun
> > 2017 10:53:14 -0700
>
> Obviously, you have to check why is your SMTP server rejecting the
> authentication.
> This doesn't look like a Gerrit issue.

What's weird is that the server doesn't appear to explicit reject the
authentication but rather respond with the kind of greeting banner
that's normally sent as the client connects, which Gerrit's SMTP client
interprets as an authentication failure.

I'd capture the session with e.g. Wireshark and inspect exactly what the
conversation looks like. This breakage could be the result of a stateful
firewall on the Fortinet side. Similarly weird issues can occur when
servers advertise SMTP pipelining support but don't actually implement
it, but I think we're too early in the conversation for pipelining to
be allowed anyway.

--
Magnus Bäck | Software Engineer, Development Tools
magnu...@axis.com | Axis Communications

Lei Lei

unread,
Jun 21, 2017, 1:49:12 PM6/21/17
to Saša Živkov, Poppy Lei, Repo and Gerrit Discussion, magnu...@axis.com
Thanks Magnus for your suggestion. I'll do what's needful.


Regards,
Lei
Reply all
Reply to author
Forward
0 new messages