Dear Team,
In our Git/Gerrit Server, We configured the following SMTP configuration.
[sendemail]
smtpServer = smtp.server.com
smtpServerPort = 25
smtpUser = mohan.s
smtpPass = mypassword
Environment Details:
OS: Ubuntu 12.04.5 LTS (64-Bit)
Git Version: 1.7.9.5
Gerrit Version: 2.10.2
With the above configuration it was working fine earlier, Suddenly email notification when we submit a review request through gerrit it stopped working. Therefore could you please help me to get emails from our Git/Gerrit application server.
From this logs, I do not find any errors.
· /var/log/mail.log
· /var/log/gerrit_error.log
Local firewall disabled & firewall enabled for SMTP Server and Port.
I have mail utility from this location /usr/bin/mail and I am above receive email with this command ( df –kh | mail –s “Test Mail” moh...@domain.com )
Thanks,
Mohan
Dear Team,
I have updated my gerrit.config file with the following,
[sendemail] enable = true
smtpServer = smtp.server.com
smtpServerPort = 25
smtpEncryption = ssl
smtpUser = mohan.s
smtpPass = mypassword
sslVerify = false
After gerrit service restart, I have tried to add send my files for review, when I add the reviewer in web portal, the following error I can in
/home/mohan.s08/gerrit/logs/error_log
[2017-02-20 09:14:52,801] ERROR com.google.gerrit.server.git.ReceiveCommits : Cannot send email for new change 324
com.google.gerrit.common.errors.EmailException: Mail Error: Connection reset
at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:285)
at com.google.gerrit.server.mail.SmtpEmailSender.send(SmtpEmailSender.java:173)
at com.google.gerrit.server.mail.OutgoingEmail.send(OutgoingEmail.java:124)
at com.google.gerrit.server.git.ReceiveCommits$CreateRequest$2.run(ReceiveCommits.java:1666)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:222)
at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:201)
at com.google.gerrit.server.util.ThreadLocalRequestScopePropagator$1.call(ThreadLocalRequestScopePropagator.java:55)
at com.google.gerrit.server.util.RequestScopePropagator$1.call(RequestScopePropagator.java:98)
at com.google.gerrit.server.util.RequestScopePropagator$3.run(RequestScopePropagator.java:163)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:368)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
at sun.security.ssl.InputRecord.read(InputRecord.java:480)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:889)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at org.apache.commons.net.smtp.SMTP.__getReply(SMTP.java:179)
at org.apache.commons.net.smtp.SMTP._connectAction_(SMTP.java:248)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:164)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:184)
at com.google.gerrit.server.mail.SmtpEmailSender.open(SmtpEmailSender.java:254)
... 17 more
Tried the following,
· Firewall admin confirmed that firewall has been open between our git/gerrit server to smtp server.
· Able to do telnet
But unable to receive any through gerrit, so kindly help me on this.
Thanks,
Mohan
--
--
To unsubscribe, email repo-discuss...@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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dear Luca.
Ok thanks for the response, I have requested admin team to check the log in SMTP Server.
Dear Magnus,
Thank you for your support.
Now I have tried with below SMTP settings in my gerrit.config file.
Method:1
smtpUser = mohan.s
smtpPass = mypassword
smtpEncryption = TLS
sslVerify = false
Error Msg from à /home/mohan.s08/gerrit/logs/error_log file.
[2017-02-20 14:22:24,081] ERROR com.google.gerrit.server.change.PostReviewers : Cannot send email to new reviewers of change 326 com.google.gerrit.common.errors.EmailException: Mail Error: SMTP server does not support TLS
Method:2
smtpUser = mohan.s
smtpPass = mypassword
smtpEncryption = ssl
sslVerify = false
Error Msg from à /home/mohan.s08/gerrit/logs/error_log file.
[2017-02-20 14:33:44,351] ERROR com.google.gerrit.server.change.EmailReviewComments : Cannot email comments for 326,1 com.google.gerrit.common.errors.EmailException: Mail Error: Connection reset
Method:3
enable = true
smtpServer = smtp.server.com
smtpServerPort = 25
smtpEncryption = ssl
smtpUser = mohan.s
smtpPass = mypassword
smtpEncryption = NONE
sslVerify = false
Error Msg from à /home/mohan.s08/gerrit/logs/error_log file.
[2017-02-20 14:39:18,421] ERROR com.google.gerrit.server.change.PostReviewers : Cannot send email to new reviewers of change 325 com.google.gerrit.common.errors.EmailException: Mail Error: Connection reset
With the below settings it was working fine earlier. Suddenly stopped working.
smtpUser = mohan.s
smtpPass = mypassword
Note: For each change in gerrit.config file, I have restarted my gerrit service.
Thanks,
Mohan
Dear Team,
I am using SSMTP, with this I am able to get mails.
My ssmtp.config file configuration as follows.
root=moh...@domain.com
mailhub=smtp.server.com:25
rewriteDomain=domain.com
hostname=git-gerrit
AuthUser=mohan.s
AuthPass=mypassword
FromLineOverride=YES
I have mail utility from this location /usr/bin/mail and I am above receive email with this command ( df –kh | mail –s “Test Mail” moh...@domain.com )
Problem only with my gerrit email notification, So kindly help me to resolve the same.
Thanks in advance.
Rgds,
Mohan
Team,
Thanks for the support.
Finally I have resolved the issue, added below line in gerrit.config file. Now email notification working perfectly.
[sendemail]
from = USER
Rgds,
Mohan