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

MessagingException message: IOException while sending message

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • email-ext-plugin
    • None
    • Jenkins Version: 2.121.3
      email-ext-plugin version: 2.63
      java.version: 1.8.0_144

      I am seeing an intermittent issue where emails are not being sent, and there is no output in the regular log to indicate why. 3 out of our last 12 builds failed to email. When I turned on email-ext debug logging I got the following output:

      [Pipeline] emailext
      messageContentType = text/html; charset=UTF-8
      Adding recipients from project recipient list
      Analyzing: ******@*******.com
      Looking for: ******@*******.com
      	starting at: 0
      	firstFoundIdx: 0
      	firstFoundIdx-substring: ******@*******.com
      	=> found type: 0
      Analyzing: ******@*******.com
      Looking for: ******@*******.com
      	starting at: 0
      	firstFoundIdx: 0
      	firstFoundIdx-substring: ******@*******.com
      	=> found type: 0
      Analyzing: ******@*******.com
      Looking for: ******@*******.com
      	starting at: 0
      	firstFoundIdx: 0
      	firstFoundIdx-substring: ******@*******.com
      	=> found type: 0
      Adding recipients from trigger recipient list
      Analyzing: ***-Jenkins,<******@*******.com>
      Looking for: ***-Jenkins
      	starting at: 0
      	firstFoundIdx: 0
      	firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
      	=> found type: 0
      Looking for: ******@*******.com
      	starting at: 12
      	firstFoundIdx: 13
      	firstFoundIdx-substring: ******@*******.com>
      	=> found type: 0
      Analyzing: ***-Jenkins,<******@*******.com>
      Looking for: ***-Jenkins
      	starting at: 0
      	firstFoundIdx: 0
      	firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
      	=> found type: 0
      Looking for: ******@*******.com
      	starting at: 12
      	firstFoundIdx: 13
      	firstFoundIdx-substring: ******@*******.com>
      	=> found type: 0
      Successfully created MimeMessage
      Sending email to: ******@*******.com
      MessagingException message: IOException while sending message

       

      The only difference between a successful email sent and an email failure is that last line:

      MessagingException message: IOException while sending message

      I noticed a similar recent issue in a different email plugin:  https://issues.jenkins-ci.org/browse/JENKINS-53305

      Since we cannot rely on an email notification, we had to implement a policy to closely watch builds to see if they fail.

       

          [JENKINS-56855] MessagingException message: IOException while sending message

          Garrett Nickerson created issue -
          Garrett Nickerson made changes -
          Description Original: I am seeing an intermittent issue where emails are not being sent, and there is no output in the regular log to indicate why. 3 out of our last 12 builds failed to email. When I turned on email-ext debug logging I got the following output:

           
          {noformat}
          [Pipeline] emailext
          messageContentType = text/html; charset=UTF-8
          Adding recipients from project recipient list
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Adding recipients from trigger recipient list
          Analyzing: ***-Jenkins,<******@*******.com>
          Looking for: ***-Jenkins
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
          => found type: 0
          Looking for: ******@*******.com
          starting at: 12
          firstFoundIdx: 13
          firstFoundIdx-substring: ******@*******.com>
          => found type: 0
          Analyzing: ***-Jenkins,<******@*******.com>
          Looking for: ***-Jenkins
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
          => found type: 0
          Looking for: ******@*******.com
          starting at: 12
          firstFoundIdx: 13
          firstFoundIdx-substring: ******@*******.com>
          => found type: 0
          Successfully created MimeMessage
          Sending email to: ******@*******.com
          MessagingException message: IOException while sending message{noformat}
           

           

           

          The only difference between a successful email sent and an email failure is that last line:

           
          {code:java}
          MessagingException message: IOException while sending message{code}
           

          I noticed a similar recent issue in a different email plugin:  https://issues.jenkins-ci.org/browse/JENKINS-53305

          Since we cannot rely on an email notification, we had to implement a policy to closely watch builds to see if they fail.

           
          New: I am seeing an intermittent issue where emails are not being sent, and there is no output in the regular log to indicate why. 3 out of our last 12 builds failed to email. When I turned on email-ext debug logging I got the following output:
          {noformat}
          [Pipeline] emailext
          messageContentType = text/html; charset=UTF-8
          Adding recipients from project recipient list
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Analyzing: ******@*******.com
          Looking for: ******@*******.com
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ******@*******.com
          => found type: 0
          Adding recipients from trigger recipient list
          Analyzing: ***-Jenkins,<******@*******.com>
          Looking for: ***-Jenkins
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
          => found type: 0
          Looking for: ******@*******.com
          starting at: 12
          firstFoundIdx: 13
          firstFoundIdx-substring: ******@*******.com>
          => found type: 0
          Analyzing: ***-Jenkins,<******@*******.com>
          Looking for: ***-Jenkins
          starting at: 0
          firstFoundIdx: 0
          firstFoundIdx-substring: ***-Jenkins,<******@*******.com>
          => found type: 0
          Looking for: ******@*******.com
          starting at: 12
          firstFoundIdx: 13
          firstFoundIdx-substring: ******@*******.com>
          => found type: 0
          Successfully created MimeMessage
          Sending email to: ******@*******.com
          MessagingException message: IOException while sending message{noformat}
           

          The only difference between a successful email sent and an email failure is that last line:
          {code:java}
          MessagingException message: IOException while sending message{code}
          I noticed a similar recent issue in a different email plugin:  https://issues.jenkins-ci.org/browse/JENKINS-53305

          Since we cannot rely on an email notification, we had to implement a policy to closely watch builds to see if they fail.

           

          Do you happen to run in AWS EC2? We bumped into a similar issue which was a bit difficult to trace and in the end concluded that it was most likely AWS throttling traffic to port 25 https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/

          Tero Kivisaari added a comment - Do you happen to run in AWS EC2? We bumped into a similar issue which was a bit difficult to trace and in the end concluded that it was most likely AWS throttling traffic to port 25  https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/
          Alex Earl made changes -
          Assignee Original: David van Laatum [ davidvanlaatum ] New: Alex Earl [ slide_o_mix ]

          Alex Earl added a comment -

          Are you willing to try a debug build that will give more information as to the cause of this issue?

          Alex Earl added a comment - Are you willing to try a debug build that will give more information as to the cause of this issue?

          Thanks for your response. We actually stopped seeing the issue after upgrading all of our components. I did not see any relevant information in the release notes for the upgraded version. Our working system has these components (among others)

          Jenkins Version: 2.164.2 
          email-ext-plugin version: 2.66
          java.version: 1.8.0_144

          Garrett Nickerson added a comment - Thanks for your response. We actually stopped seeing the issue after upgrading all of our components. I did not see any relevant information in the release notes for the upgraded version. Our working system has these components (among others) Jenkins Version: 2.164.2  email-ext-plugin version: 2.66 java.version: 1.8.0_144
          Garrett Nickerson made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Garrett Nickerson made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

            slide_o_mix Alex Earl
            garrett8357 Garrett Nickerson
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: