Email notification not working but testmail did

Hello,

I setup the mail server and sending a test email from that page (Hub) works well but Upsource is not sending any notifications.
Can't find anything in the logs to get a glue what's going wrong.

Upsource version is 2.5.2.

I hope someone has an idea.

Thanks,
Chris

 

8 comments
Comment actions Permalink

Hi Chris,

Hub and Upsource use different code for sending emails, unfortunately. So when one works it doesn't mean another one also should.

Do you see any mail related warning/errors in the following file: 

<Upsource_dir>\logs\upsource-monitoring\warn.log

0
Comment actions Permalink

Thanks Artem.

Indeed there is a:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I added the certificate to "Trusted SSL Certificates" but that is in the Hub settings. Where should I add it so the Upsource code also uses it?

0
Comment actions Permalink

Upsource doesn't have a UI for it - https://youtrack.jetbrains.com/issue/UP-1799, so need to export the certificate directly to JVM.

0
Comment actions Permalink

Is there a default keystore Upsource uses or how to tell Upsource which keystore and password to use? Not that straight-forward. Why isn't this part of your documentation to setup mail notification?

0
Comment actions Permalink

Sorry for not mentioning it before.

If you use bundled JVM machine you have to import certificate to its keystore.

Location of the keystore might be found in conf/internal/bundle.properties file, property called: additional-keystore-path

Yes, it's a good note to add to the documentation. Thanks for bringing it up,  will defiantly do that. 

0
Comment actions Permalink

Thanks Artem for your quick help.

0
Comment actions Permalink

This is the error I can see there , any help ?

 

at com.jetbrains.upsource.backend.server.mail.MailSender.sendMail(MailSender.java:79)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.sendToEmail(MailProcessor.java:382)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.b(MailProcessor.java:484)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.a(MailProcessor.java:399)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.a(MailProcessor.java:457)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.a(MailProcessor.java:457)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.b(MailProcessor.java:392)
at com.jetbrains.upsource.backend.server.mail.MailProcessor.a(MailProcessor.java:149)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at com.jetbrains.upsource.util.NamedDaemonThreadFactory.a(NamedDaemonThreadFactory.java:34)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : 192.168.2.7:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
at org.apache.commons.mail.Email.send(Email.java:1437)
at com.jetbrains.upsource.backend.server.mail.MailSender.sendMail(MailSender.java:76)
... 16 more
Caused by: javax.mail.AuthenticationFailedException: 535 5.7.0 authentication failed

at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:892)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:814)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:728)
at javax.mail.Service.connect(Service.java:386)
at javax.mail.Service.connect(Service.java:245)
at javax.mail.Service.connect(Service.java:194)
at javax.mail.Transport.send0(Transport.java:253)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)

0
Comment actions Permalink

Looks like the exception isn't related to custom certificates.

Do you see any helpful warning/errors on the SMTP server side? 

0

Please sign in to leave a comment.