Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2206

Unable to configure Hudson to use TLS for gmail

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: mailer-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All

      Description

      When I attempt to configure Hudson to use my gmail account for sending emails, I
      am unable to configure it to use TLS. When I use the SSL that it allows, I receive:

      java.net.SocketException: java.security.NoSuchAlgorithmException: Error
      constructing implementation (algorithm: Default, provider: SunJSSE, class:
      sun.security.ssl.DefaultSSLContextImpl)

        Issue Links

          Activity

          esmithbss esmithbss created issue -
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Can you post the entire stack trace?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Can you post the entire stack trace?
          kohsuke Kohsuke Kawaguchi made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          esmithbss esmithbss added a comment -

          Created an attachment (id=352)
          Resulting Stack Trace from email attempt.

          Show
          esmithbss esmithbss added a comment - Created an attachment (id=352) Resulting Stack Trace from email attempt.
          Hide
          mindless Alan Harder added a comment -

          See related request JENKINS-5206 for same feature in email-ext plugin.

          Show
          mindless Alan Harder added a comment - See related request JENKINS-5206 for same feature in email-ext plugin.
          mindless Alan Harder made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          mindless Alan Harder made changes -
          Link This issue is duplicated by JENKINS-2368 [ JENKINS-2368 ]
          Hide
          mindless Alan Harder added a comment -

          Duplicate JENKINS-2368 mentioned:

          This can be fixed on the java mail api setting this property:

          props.put("mail.smtp.starttls.enable","true");

          Show
          mindless Alan Harder added a comment - Duplicate JENKINS-2368 mentioned: This can be fixed on the java mail api setting this property: props.put("mail.smtp.starttls.enable","true");
          Hide
          firstlux firstlux added a comment -

          Please note that there is a work-around for enabling TLS.

          The Hudson Mailer class first loads System.getProperties() when initializing the Properties object for Java Mail. As such, you may add 'mail.smtp.starttls.enable="true"' property to System Properties when starting up Hudson.

          $ java -Dmail.smtp.starttls.enable="true" -jar hudson.war

          Show
          firstlux firstlux added a comment - Please note that there is a work-around for enabling TLS. The Hudson Mailer class first loads System.getProperties() when initializing the Properties object for Java Mail. As such, you may add 'mail.smtp.starttls.enable="true"' property to System Properties when starting up Hudson. $ java -Dmail.smtp.starttls.enable="true" -jar hudson.war
          mindless Alan Harder made changes -
          Link This issue is duplicated by JENKINS-6535 [ JENKINS-6535 ]
          Hide
          antonystubbs antonystubbs added a comment -

          Unfortunately, adding a "Global properties" entry for this doesn't appear to work.

          But, adding it to the JAVA_OPTS variable in /etc/init.d/tomcat6 works.

          Show
          antonystubbs antonystubbs added a comment - Unfortunately, adding a "Global properties" entry for this doesn't appear to work. But, adding it to the JAVA_OPTS variable in /etc/init.d/tomcat6 works.
          Hide
          da7489 Deepak Arora added a comment -

          If running Jenkins on Tomcat under Windows, enter the below line at the end in the JAVA tab of the tomcat7w.exe
          Dmail.smtp.starttls.enable="true"

          Show
          da7489 Deepak Arora added a comment - If running Jenkins on Tomcat under Windows, enter the below line at the end in the JAVA tab of the tomcat7w.exe Dmail.smtp.starttls.enable="true"
          ircbot IRCbot Run by Kohsuke made changes -
          Component/s mailer [ 17522 ]
          Component/s mail [ 15493 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              esmithbss esmithbss
            • Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: