Support

Expand all | Collapse all

Stream notification emails not being sent/received.

  • 1.  Stream notification emails not being sent/received.

    Posted 04-06-2017 22:27
    Hi. Was wondering if someone could shed some light on email notification under 'stream' module. Email are not being sent/received.

    - Both SMTP and IMAP functions test successfully under System Properties | General Properties; ie underlying infrastructure okay.
    - Emails are successfully received when emails come from an external application (eg Outlook); ie email account working.
    - Emails are successfully sent from IMAP account using Outlook. ie email account working.

    Logs show:
    2017-04-07 05:17:00,009 DEBUG jamaSchedulerFactoryBean_Worker-15 contour [com.jamasoftware.contour.service.impl.NotificationServiceImpl] - 0 email(s) were sent successfully and 0 email(s) failed to be sent.
    2017-04-07 05:17:02,544 DEBUG jamaSchedulerFactoryBean_Worker-17 contour [com.jamasoftware.contour.notification.service.CommentWithEmailServiceImpl] - Read 0 emails.

    Thanks in advance.
    -Terence

    ------------------------------
    Jama version 8.10.2. Locally installed.
    ------------------------------


  • 2.  RE: Stream notification emails not being sent/received.

    Posted 04-07-2017 10:25
    Edited by Kristina King 04-07-2017 10:26

    Hi Terence,

    If the IMAP and SMTP setup in Admin tests successfully, it's possible you are running into a defect, SOS-DEF-1503. You can confirm this via the logs by adding some more levels of debugging: 

    -Add the below to log4j.properties file (/data/config/log4j.properties). We should then get stack traces.

    log4j.logger.com.jamasoftware.contour.service.impl.MailServiceImpl=DEBUG, logfile
    log4j.additivity.com.jamasoftware.contour.service.impl.MailServiceImpl=false


    After you have added the above:

    • Reset logging from root > logging
    • @mention someone and wait a few minutes
    • check the contour.log. The contour.log would then display a stack trace with contents such as 
    2017-02-21 19:02:00,043 DEBUG jamaSchedulerFactoryBean_Worker-19 jama [com.jamasoftware.contour.service.impl.MailServiceImpl] - Can't send email. Email id: 56490 Stacktrace:
    org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    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; message exception details (1) are:
    Failed message 1:
    javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    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
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
    at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:416)
    at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
    at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
    at com.jamasoftware.contour.service.impl.MailServiceImpl.sendEmail(MailServiceImpl.java:73)
    at sun.reflect.GeneratedMethodAccessor7213.invoke(Unknown Source)


    Here is the workaround:
    1) Get the TLS cert off of your Jama app server.
    Here's how to get the Jama cert as a pem formatted file:

    openssl s_client -connect [Your Jama URL]:443 -showcerts | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /path/to/location/cert.pem


    2) Then, go ahead and import it into the keystore as a PEM-formatted file, via the settings in the Admin console.

    The issue should then be resolved. Please let me know if you have any questions.



    ------------------------------
    Kristina King
    Jama Software
    ------------------------------



  • 3.  RE: Stream notification emails not being sent/received.

    Posted 04-12-2017 23:23
      |   view attached
    Hi Kristina,

    Unfortunately, the suggested workaround did not resolve the issue. The stack trace (attached) is exactly as per your previous reply even after exporting and importing the certificate.

    Any suggestions?

    Thanks

    ------------------------------
    Terence Wong
    ------------------------------

    Attachment(s)

    txt
    trace.txt   9K 1 version


  • 4.  RE: Stream notification emails not being sent/received.

    Posted 04-13-2017 10:33
    Hi Terence,

    We should check if something else is at play here. I am going to open up a support ticket so we can dig deeper into this.

    ------------------------------
    Kristina King
    Jama Software
    ------------------------------