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

email-ext plugin does not save configuration on job

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
    • Environment:
      Email-ext plugin version 2.24.1 / 2.25
      Jenkins version LTS 1.446.2 / LTS 1.480.2
    • Similar Issues:

      Description

      Each job lost the stored email addresses.
      $DEFAULT_RECIPITENS is the env that I see each time I reopen a previously confiugred job.
      This does not allow to communicate to developers the failing builds.

        Attachments

        1. ext-email.jpg
          ext-email.jpg
          110 kB
        2. issue_snapshot.png
          issue_snapshot.png
          71 kB
        3. jenkins_email_ext.png
          jenkins_email_ext.png
          77 kB

          Activity

          frido82 Federico Paolantoni created issue -
          Hide
          slide_o_mix Alex Earl added a comment -

          I can't replicate this. I use the same versions with no problems.

          Show
          slide_o_mix Alex Earl added a comment - I can't replicate this. I use the same versions with no problems.
          Hide
          frido82 Federico Paolantoni added a comment -

          I configured some env variables instead of typing each time the list of recipients.
          So in the main jenkins configuration there is a variable MAILING_LIST_JAVA and in each job i type $MAILING_LIST_JAVA in recipient form, but when I re-open a previously saved configuration I always see $DEFAULT_RECIPIENTS

          Show
          frido82 Federico Paolantoni added a comment - I configured some env variables instead of typing each time the list of recipients. So in the main jenkins configuration there is a variable MAILING_LIST_JAVA and in each job i type $MAILING_LIST_JAVA in recipient form, but when I re-open a previously saved configuration I always see $DEFAULT_RECIPIENTS
          Hide
          slide_o_mix Alex Earl added a comment -

          I also use environment variables in my configuration and have no issues. Are you sure you are running 2.24.1? Did you restart Jenkins after upgrading?

          Show
          slide_o_mix Alex Earl added a comment - I also use environment variables in my configuration and have no issues. Are you sure you are running 2.24.1? Did you restart Jenkins after upgrading?
          Hide
          frido82 Federico Paolantoni added a comment -

          Yes, i allways use to check the checkbox "restart jenkins after plugin installation".
          I don't see error in logs on restart.

          Show
          frido82 Federico Paolantoni added a comment - Yes, i allways use to check the checkbox "restart jenkins after plugin installation". I don't see error in logs on restart.
          Hide
          slide_o_mix Alex Earl added a comment -

          I just tried this again to make sure, and I am unable to reproduce the issue.

          Show
          slide_o_mix Alex Earl added a comment - I just tried this again to make sure, and I am unable to reproduce the issue.
          Hide
          frido82 Federico Paolantoni added a comment -

          The environment where i'm having this issue is a Red Hat Enterprise Linux Server release 6.2 (Santiago)
          Tocmat 7.
          Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
          Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)

          Unfortunately I don't know how to give you more info..
          Could I set a different log level for this plugin?

          Thanks for your investigation.

          Show
          frido82 Federico Paolantoni added a comment - The environment where i'm having this issue is a Red Hat Enterprise Linux Server release 6.2 (Santiago) Tocmat 7. Java(TM) SE Runtime Environment (build 1.6.0_30-b12) Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode) Unfortunately I don't know how to give you more info.. Could I set a different log level for this plugin? Thanks for your investigation.
          Hide
          slide_o_mix Alex Earl added a comment -

          No, there isn't a higher level of logging for the plugin. Can you try looking at the HTTP traffic in your browser when you submit and send the fields that are being sent to the server?

          Show
          slide_o_mix Alex Earl added a comment - No, there isn't a higher level of logging for the plugin. Can you try looking at the HTTP traffic in your browser when you submit and send the fields that are being sent to the server?
          Hide
          slide_o_mix Alex Earl added a comment -

          Looks like your Jenkins version is pretty old. Can you try upgrading to the most recent LTS (1.466.x) and see if you still have the issue. The testing for the plugin is always done with the latest LTS.

          Show
          slide_o_mix Alex Earl added a comment - Looks like your Jenkins version is pretty old. Can you try upgrading to the most recent LTS (1.466.x) and see if you still have the issue. The testing for the plugin is always done with the latest LTS.
          slide_o_mix Alex Earl made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          Hide
          phongth Tran Phong added a comment -

          I have the same problem now. I created a strawboss job, then saved the job email notification configuration but not effect. It said "Saved" but when loading the configuration, it does not change anything

          Show
          phongth Tran Phong added a comment - I have the same problem now. I created a strawboss job, then saved the job email notification configuration but not effect. It said "Saved" but when loading the configuration, it does not change anything
          Hide
          phongth Tran Phong added a comment -

          I have the same problem now. I created a strawboss job, then saved the job email notification configuration but not effect. It said "Saved" but when loading the configuration, it does not change anything.Note: jenkins 1500

          Show
          phongth Tran Phong added a comment - I have the same problem now. I created a strawboss job, then saved the job email notification configuration but not effect. It said "Saved" but when loading the configuration, it does not change anything.Note: jenkins 1500
          phongth Tran Phong made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          phongth Tran Phong made changes -
          Status Reopened [ 4 ] Open [ 1 ]
          phongth Tran Phong made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          phongth Tran Phong made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Hide
          slide_o_mix Alex Earl added a comment -

          Are there any exceptions in the Jenkins log? I can't replicate this issue.

          Show
          slide_o_mix Alex Earl added a comment - Are there any exceptions in the Jenkins log? I can't replicate this issue.
          Hide
          phongth Tran Phong added a comment -

          No exception found in Jk log or console. running with jdk1.6.0_33, apache-tomcat-7.0.29, chrome (firefox, IE too). I found the job config.xml was not saved exectly

          Show
          phongth Tran Phong added a comment - No exception found in Jk log or console. running with jdk1.6.0_33, apache-tomcat-7.0.29, chrome (firefox, IE too). I found the job config.xml was not saved exectly
          Hide
          slide_o_mix Alex Earl added a comment -

          Do other plugins save configuration correctly?

          Show
          slide_o_mix Alex Earl added a comment - Do other plugins save configuration correctly?
          Hide
          phongth Tran Phong added a comment -

          I create a "Build a free-style software project": saving config ok. I create "Strawboss: External Job Monitor": saving config NOK. Maybe it is a strawboss job bug here.

          Show
          phongth Tran Phong added a comment - I create a "Build a free-style software project": saving config ok. I create "Strawboss: External Job Monitor": saving config NOK. Maybe it is a strawboss job bug here.
          Hide
          phongth Tran Phong added a comment -

          I try to manually edit email notification in config.xml of strawboss job, then view on GUI ok, test sending email on job failure ok. I think the saving configuration of strawboss plugin has problem.

          Show
          phongth Tran Phong added a comment - I try to manually edit email notification in config.xml of strawboss job, then view on GUI ok, test sending email on job failure ok. I think the saving configuration of strawboss plugin has problem.
          Hide
          slide_o_mix Alex Earl added a comment -

          I have no idea what a strawboss job is. Can you point me to information?

          Show
          slide_o_mix Alex Earl added a comment - I have no idea what a strawboss job is. Can you point me to information?
          Hide
          phongth Tran Phong added a comment -

          Strawboss Plugin: Strawboss supports the same features as Jenkins external job monitor with added support for sending email notifications or triggering other jobs.
          You can install this plugin and create a job to reproduce this bug

          Show
          phongth Tran Phong added a comment - Strawboss Plugin: Strawboss supports the same features as Jenkins external job monitor with added support for sending email notifications or triggering other jobs. You can install this plugin and create a job to reproduce this bug
          Hide
          slide_o_mix Alex Earl added a comment -

          Wouldn't this be a bug in the Strawboss Plugin then?

          Show
          slide_o_mix Alex Earl added a comment - Wouldn't this be a bug in the Strawboss Plugin then?
          Hide
          phongth Tran Phong added a comment -

          I think so. the plugin was released in 2011

          Show
          phongth Tran Phong added a comment - I think so. the plugin was released in 2011
          Hide
          slide_o_mix Alex Earl added a comment -

          There have been several changes to email-ext in that time, it's possible that Strawboss needs to be updated to correct this issue.

          Show
          slide_o_mix Alex Earl added a comment - There have been several changes to email-ext in that time, it's possible that Strawboss needs to be updated to correct this issue.
          Hide
          phongth Tran Phong added a comment -

          Thank Alex! I just want to monitor external job (linux crontab) with sending email on job failure. Do you have any ideas?

          Show
          phongth Tran Phong added a comment - Thank Alex! I just want to monitor external job (linux crontab) with sending email on job failure. Do you have any ideas?
          Hide
          slide_o_mix Alex Earl added a comment -

          Does the normal external job monitor not allow email?

          Show
          slide_o_mix Alex Earl added a comment - Does the normal external job monitor not allow email?
          Hide
          phongth Tran Phong added a comment -

          the normal external job monitor doesnot. only the strawboss external job allows to config Post-build Actions with Editable Email Notification (email-ext plugin) in there.

          Show
          phongth Tran Phong added a comment - the normal external job monitor doesnot. only the strawboss external job allows to config Post-build Actions with Editable Email Notification (email-ext plugin) in there.
          Hide
          dejan2609 Dejan Stojadinović added a comment - - edited

          Just to confirm this bug.
          Jenkins: 1.480.2 LTS (deployed in Tomcat 7); Email-ext plugin 2.25

          Show
          dejan2609 Dejan Stojadinović added a comment - - edited Just to confirm this bug. Jenkins: 1.480.2 LTS (deployed in Tomcat 7); Email-ext plugin 2.25
          dejan2609 Dejan Stojadinović made changes -
          Environment Email-ext plugin version 2.24.1
          Jenkins version LTS 1.446.2
          Email-ext plugin version 2.24.1 / 2.25
          Jenkins version LTS 1.446.2 / LTS 1.480.2
          Hide
          slide_o_mix Alex Earl added a comment -

          @Dejan - With strawboss or normal job? I am unable to replicate this even with running in Tomcat.

          Show
          slide_o_mix Alex Earl added a comment - @Dejan - With strawboss or normal job? I am unable to replicate this even with running in Tomcat.
          dejan2609 Dejan Stojadinović made changes -
          Attachment issue_snapshot.png [ 23147 ]
          Hide
          slide_o_mix Alex Earl added a comment -

          You are looking at the info for the failure trigger, look above that, the email@email.com is saved correctly. See the update of your screenshot attached.

          Show
          slide_o_mix Alex Earl added a comment - You are looking at the info for the failure trigger, look above that, the email@email.com is saved correctly. See the update of your screenshot attached.
          Hide
          slide_o_mix Alex Earl added a comment -

          Noted the fields in the xml vs. the form fields.

          Show
          slide_o_mix Alex Earl added a comment - Noted the fields in the xml vs. the form fields.
          slide_o_mix Alex Earl made changes -
          Attachment jenkins_email_ext.png [ 23148 ]
          Hide
          dejan2609 Dejan Stojadinović added a comment -

          Steps to reproduce: enter recipient email and other details, hit "Save" and/or "Apply"
          Plugin configuriation is saved in Jenkins Web UI, but somehow not in config.xml that describes job (see attached snapshot).
          (I even tried to save configuration multiple times, but no joy)

          @Alex
          I reckon that my job is normal (I'm not using https://wiki.jenkins-ci.org/display/JENKINS/Strawboss+Plugin, if that's what you ask me for).

          Kudos for a quick reply, let me know if I may be of assistance

          Show
          dejan2609 Dejan Stojadinović added a comment - Steps to reproduce: enter recipient email and other details, hit "Save" and/or "Apply" Plugin configuriation is saved in Jenkins Web UI, but somehow not in config.xml that describes job (see attached snapshot ). (I even tried to save configuration multiple times, but no joy) @Alex I reckon that my job is normal (I'm not using https://wiki.jenkins-ci.org/display/JENKINS/Strawboss+Plugin , if that's what you ask me for). Kudos for a quick reply, let me know if I may be of assistance
          Hide
          dejan2609 Dejan Stojadinović added a comment -

          @Alex: our replies jsut crossed

          Thanx man, I will try to digg deeper and will let you know what I found.
          Regards !

          Show
          dejan2609 Dejan Stojadinović added a comment - @Alex: our replies jsut crossed Thanx man, I will try to digg deeper and will let you know what I found. Regards !
          Hide
          dejan2609 Dejan Stojadinović added a comment -

          Update: plugin works like a charm ! (On Jenkins: 1.480.2 LTS deployed in Tomcat 7 and Email-ext plugin 2.25)

          Hint for othesr: in case you experience some issues just after installation restart Tomcat once more

          Show
          dejan2609 Dejan Stojadinović added a comment - Update: plugin works like a charm ! (On Jenkins: 1.480.2 LTS deployed in Tomcat 7 and Email-ext plugin 2.25) Hint for othesr: in case you experience some issues just after installation restart Tomcat once more
          slide_o_mix Alex Earl made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          slide_o_mix Alex Earl made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          xter Benjamin Dewez added a comment -

          Hello,

          I have the same issue with Jenkins 1.518 mailer:1.5 and ext-mail:2.32

          When I define a "Recipent" and I save my job configuration, Jenkins lost my update on this field.

          I use Jenkins as service on RedHat6 OS. Other plugins work fine.

          Show
          xter Benjamin Dewez added a comment - Hello, I have the same issue with Jenkins 1.518 mailer:1.5 and ext-mail:2.32 When I define a "Recipent" and I save my job configuration, Jenkins lost my update on this field. I use Jenkins as service on RedHat6 OS. Other plugins work fine.
          xter Benjamin Dewez made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          felixschwitzer felix schwitzer added a comment -

          I have the same problem with the configuration option 'trigger for matrix projects';
          again the option is not stored in config.xml.

          Show
          felixschwitzer felix schwitzer added a comment - I have the same problem with the configuration option 'trigger for matrix projects'; again the option is not stored in config.xml.
          Hide
          slide_o_mix Alex Earl added a comment -

          @felix Trigger for matrix is a different issue, I am fixing in the next version.
          @Benjamin - can you check the Jenkins logs for any errors?

          Show
          slide_o_mix Alex Earl added a comment - @felix Trigger for matrix is a different issue, I am fixing in the next version. @Benjamin - can you check the Jenkins logs for any errors?
          Hide
          mdevey Michael Devey added a comment -

          Reproduced this with email-ext 2.32
          windows 7: native 1.530 , native 1.509 (LTS)
          centos 5.8: war 1.530

          Workmate found the work around - just add a success trigger in the advance section of the editable email notification.
          (It repopulates the config page correctly from config.xml if any triggers exist)

          We also had trouble finding this bug because $DEFAULT_RECIPIENTS was spelled incorrectly ... :-/

          Show
          mdevey Michael Devey added a comment - Reproduced this with email-ext 2.32 windows 7: native 1.530 , native 1.509 (LTS) centos 5.8: war 1.530 Workmate found the work around - just add a success trigger in the advance section of the editable email notification. (It repopulates the config page correctly from config.xml if any triggers exist) We also had trouble finding this bug because $DEFAULT_RECIPIENTS was spelled incorrectly ... :-/
          Hide
          slide_o_mix Alex Earl added a comment -

          I was never able to reproduce this issue.

          Show
          slide_o_mix Alex Earl added a comment - I was never able to reproduce this issue.
          Hide
          jacruzca Jhon Cruz added a comment -

          I reproduced this with:

          • Ubuntu 13.04 + Firefox 22
          • email-ext 2.33 and 2.32
          • Jenkins ver. 1.530
          • No strawboss plugin

          Click on configure job, changed the values of Project Recipient List, Project Reply-To List, Default subject. Then save, then configure again and values entered before are not there. It just left the default ones.

          Temporary workaround for me:

          From there everything is working fine.

          Show
          jacruzca Jhon Cruz added a comment - I reproduced this with: Ubuntu 13.04 + Firefox 22 email-ext 2.33 and 2.32 Jenkins ver. 1.530 No strawboss plugin Click on configure job, changed the values of Project Recipient List, Project Reply-To List, Default subject. Then save, then configure again and values entered before are not there. It just left the default ones. Temporary workaround for me: download version 2.30.2 from here http://updates.jenkins-ci.org/download/plugins/email-ext/2.30.2/email-ext.hpi - install it manually. From there everything is working fine.
          Hide
          slide_o_mix Alex Earl added a comment -

          I'm using the latest version in my setup at work with no issues, not sure how to debug the issue.

          Show
          slide_o_mix Alex Earl added a comment - I'm using the latest version in my setup at work with no issues, not sure how to debug the issue.
          Hide
          slide_o_mix Alex Earl added a comment -

          @Michael, DEFAULT_RECIPIENTS was spelled incorrectly?

          Show
          slide_o_mix Alex Earl added a comment - @Michael, DEFAULT_RECIPIENTS was spelled incorrectly?
          Hide
          mdevey Michael Devey added a comment -

          @Alex, sorry

          We also had trouble finding this bug report because $DEFAULT_RECIPIENTS was spelled incorrectly in the report.

          Show
          mdevey Michael Devey added a comment - @Alex, sorry We also had trouble finding this bug report because $DEFAULT_RECIPIENTS was spelled incorrectly in the report.
          Hide
          spots107 Jason Spotswood added a comment - - edited

          I am also experiencing the problem where the configuration for the email-ext plugin is not saved. I am using Jenkins 1.531 and Jenkins Email Extension Plugin 2.34. Jenkins is contained within Tomcat 7.
          I was able to use the work around specified by @Michael Devey to get the configuration to be saved.

          Show
          spots107 Jason Spotswood added a comment - - edited I am also experiencing the problem where the configuration for the email-ext plugin is not saved. I am using Jenkins 1.531 and Jenkins Email Extension Plugin 2.34. Jenkins is contained within Tomcat 7. I was able to use the work around specified by @Michael Devey to get the configuration to be saved.
          adubrouski Alex Dubrouski made changes -
          Attachment ext-email.jpg [ 24467 ]
          Hide
          adubrouski Alex Dubrouski added a comment -

          I see similar issue (please check screenshot attached). Every time I open job to configure, all fields of ext-email are reset to default, though I still see my settings in config.xml. Incorrect data bean initialization?

          Show
          adubrouski Alex Dubrouski added a comment - I see similar issue (please check screenshot attached). Every time I open job to configure, all fields of ext-email are reset to default, though I still see my settings in config.xml. Incorrect data bean initialization?
          Hide
          slide_o_mix Alex Earl added a comment -

          No errors in the Jenkins logs? No errors in the is console of the browser?

          Show
          slide_o_mix Alex Earl added a comment - No errors in the Jenkins logs? No errors in the is console of the browser?
          Hide
          slide_o_mix Alex Earl added a comment -

          Can someone post their config.XML that is not being saved or restored?

          Show
          slide_o_mix Alex Earl added a comment - Can someone post their config.XML that is not being saved or restored?
          Hide
          slide_o_mix Alex Earl added a comment -

          I have a version of the plugin that uses a DataBoundConstructor to marshal the data from the form instead of overriding the newInstance method. If anyone is interested in testing it, please let me know.

          Show
          slide_o_mix Alex Earl added a comment - I have a version of the plugin that uses a DataBoundConstructor to marshal the data from the form instead of overriding the newInstance method. If anyone is interested in testing it, please let me know.
          Hide
          spots107 Jason Spotswood added a comment -

          When the work around is not used, the XML config that gets generated for the job relating to this plugin is:
          <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.34">
          <recipientList>blah@blah.com</recipientList>
          <configuredTriggers/>
          <contentType>default</contentType>
          <defaultSubject>Subject</defaultSubject>
          <defaultContent>Content</defaultContent>
          <attachmentsPattern/>
          <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript>
          <attachBuildLog>false</attachBuildLog>
          <compressBuildLog>false</compressBuildLog>
          <replyTo/>
          <saveOutput>false</saveOutput>
          </hudson.plugins.emailext.ExtendedEmailPublisher>

          Show
          spots107 Jason Spotswood added a comment - When the work around is not used, the XML config that gets generated for the job relating to this plugin is: <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.34"> <recipientList>blah@blah.com</recipientList> <configuredTriggers/> <contentType>default</contentType> <defaultSubject>Subject</defaultSubject> <defaultContent>Content</defaultContent> <attachmentsPattern/> <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript> <attachBuildLog>false</attachBuildLog> <compressBuildLog>false</compressBuildLog> <replyTo/> <saveOutput>false</saveOutput> </hudson.plugins.emailext.ExtendedEmailPublisher>
          Hide
          spots107 Jason Spotswood added a comment -

          @ Alex Earl, I would be interested in testing your new plugin version if you can let me know where to access it from.

          Show
          spots107 Jason Spotswood added a comment - @ Alex Earl, I would be interested in testing your new plugin version if you can let me know where to access it from.
          Hide
          dregin Bernard McKeever added a comment -

          @Alex Earl, I'll test the new build.

          Show
          dregin Bernard McKeever added a comment - @Alex Earl, I'll test the new build.
          Show
          slide_o_mix Alex Earl added a comment - Please try the hpi from here https://buildhive.cloudbees.com/job/jenkinsci/job/email-ext-plugin/org.jenkins-ci.plugins$email-ext/198/
          Hide
          dregin Bernard McKeever added a comment -

          Thanks Alex, I just checked the .hpi provided.

          Behaviour doesn't seem to have changed, but I did notice that if I add a trigger, I'm able to set the Project Recipient List to my own email address without issue.
          If I remove that trigger and hit "save", the value in the Project Recipient List reverts to $DEFAULT_RECIPIENTS.

          Looks like it's dependent on there being a trigger set.

          Thanks for the work on this!

          Show
          dregin Bernard McKeever added a comment - Thanks Alex, I just checked the .hpi provided. Behaviour doesn't seem to have changed, but I did notice that if I add a trigger, I'm able to set the Project Recipient List to my own email address without issue. If I remove that trigger and hit "save", the value in the Project Recipient List reverts to $DEFAULT_RECIPIENTS. Looks like it's dependent on there being a trigger set. Thanks for the work on this!
          Hide
          dregin Bernard McKeever added a comment -

          Just rolled back to 2.34 and the above work around works in it too.

          Still not receiving any mail. This is what I see in the job's log:

          BUILD SUCCESSFUL
          Total time: 0 seconds
          Email was triggered for: Success
          Sending email for trigger: Success
          An attempt to send an e-mail to empty list of recipients, ignored.
          Finished: SUCCESS
          

          The job's config looks like this:

            <publishers>
              <hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.34">
                <recipientList>bernard.mckeever@REMOVEDHOST.com</recipientList>
                <configuredTriggers>
                  <hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
                    <email>
                      <recipientList></recipientList>
                      <subject>$PROJECT_DEFAULT_SUBJECT</subject>
                      <body>$PROJECT_DEFAULT_CONTENT</body>
                      <sendToDevelopers>true</sendToDevelopers>
                      <sendToRequester>false</sendToRequester>
                      <includeCulprits>false</includeCulprits>
                      <sendToRecipientList>false</sendToRecipientList>
                      <attachmentsPattern></attachmentsPattern>
                      <attachBuildLog>false</attachBuildLog>
                      <compressBuildLog>false</compressBuildLog>
                      <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo>
                      <contentType>project</contentType>
                    </email>
                  </hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
                </configuredTriggers>
                <contentType>default</contentType>
                <defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
                <defaultContent>$DEFAULT_CONTENT</defaultContent>
                <attachmentsPattern></attachmentsPattern>
                <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript>
                <attachBuildLog>false</attachBuildLog>
                <compressBuildLog>false</compressBuildLog>
                <replyTo>$DEFAULT_REPLYTO</replyTo>
                <saveOutput>false</saveOutput>
              </hudson.plugins.emailext.ExtendedEmailPublisher>
            </publishers>
          

          Two recipientList nodes?

          When I go back and go into the trigger's advanced button and set my address there, I see the empty recipientList node from above populated in config.xml and I receive the expected mail.

          Show
          dregin Bernard McKeever added a comment - Just rolled back to 2.34 and the above work around works in it too. Still not receiving any mail. This is what I see in the job's log: BUILD SUCCESSFUL Total time: 0 seconds Email was triggered for : Success Sending email for trigger: Success An attempt to send an e-mail to empty list of recipients, ignored. Finished: SUCCESS The job's config looks like this: <publishers> <hudson.plugins.emailext.ExtendedEmailPublisher plugin= "email-ext@2.34" > <recipientList>bernard.mckeever@REMOVEDHOST.com</recipientList> <configuredTriggers> <hudson.plugins.emailext.plugins.trigger.SuccessTrigger> <email> <recipientList></recipientList> <subject>$PROJECT_DEFAULT_SUBJECT</subject> <body>$PROJECT_DEFAULT_CONTENT</body> <sendToDevelopers> true </sendToDevelopers> <sendToRequester> false </sendToRequester> <includeCulprits> false </includeCulprits> <sendToRecipientList> false </sendToRecipientList> <attachmentsPattern></attachmentsPattern> <attachBuildLog> false </attachBuildLog> <compressBuildLog> false </compressBuildLog> <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> <contentType>project</contentType> </email> </hudson.plugins.emailext.plugins.trigger.SuccessTrigger> </configuredTriggers> <contentType> default </contentType> <defaultSubject>$DEFAULT_SUBJECT</defaultSubject> <defaultContent>$DEFAULT_CONTENT</defaultContent> <attachmentsPattern></attachmentsPattern> <presendScript>$DEFAULT_PRESEND_SCRIPT</presendScript> <attachBuildLog> false </attachBuildLog> <compressBuildLog> false </compressBuildLog> <replyTo>$DEFAULT_REPLYTO</replyTo> <saveOutput> false </saveOutput> </hudson.plugins.emailext.ExtendedEmailPublisher> </publishers> Two recipientList nodes? When I go back and go into the trigger's advanced button and set my address there, I see the empty recipientList node from above populated in config.xml and I receive the expected mail.
          Hide
          slide_o_mix Alex Earl added a comment -

          Both the triggers and the project level have recipient lists. If you set the address in the project level one, you need to check the box for send to recipient list. If you set your address in the trigger recipient list, it will always send to that list for that trigger.

          Show
          slide_o_mix Alex Earl added a comment - Both the triggers and the project level have recipient lists. If you set the address in the project level one, you need to check the box for send to recipient list. If you set your address in the trigger recipient list, it will always send to that list for that trigger.
          Hide
          slide_o_mix Alex Earl added a comment -

          Ok, I'm pretty sure I know why this is failing now. I'll work on a fix.

          Show
          slide_o_mix Alex Earl added a comment - Ok, I'm pretty sure I know why this is failing now. I'll work on a fix.
          Hide
          slide_o_mix Alex Earl added a comment -

          Yes, I have a fix for this issue and will push it and do a release soon.

          Show
          slide_o_mix Alex Earl added a comment - Yes, I have a fix for this issue and will push it and do a release soon.
          Hide
          slide_o_mix Alex Earl added a comment -

          This bug only occurs when no triggers are configured, this was the clue. It could be said that not configuring any triggers is kind of useless for email-ext, since no emails will be sent without a trigger being setup, but I fixed it so the other fields will be retained even if no triggers are defined.

          Show
          slide_o_mix Alex Earl added a comment - This bug only occurs when no triggers are configured, this was the clue. It could be said that not configuring any triggers is kind of useless for email-ext, since no emails will be sent without a trigger being setup, but I fixed it so the other fields will be retained even if no triggers are defined.
          Hide
          dregin Bernard McKeever added a comment -

          I would have thought that if no triggers were set, the email should be sent for all job end types.

          Show
          dregin Bernard McKeever added a comment - I would have thought that if no triggers were set, the email should be sent for all job end types.
          Hide
          slide_o_mix Alex Earl added a comment -

          No, if there are no triggers, no email will be sent.

          Show
          slide_o_mix Alex Earl added a comment - No, if there are no triggers, no email will be sent.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.groovy
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/7ba282f904ebdf52cd2241a1a41307b9e13b248e
          Log:
          Fix JENKINS-15442

          Removed check for triggers to determine configured state.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.groovy src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java http://jenkins-ci.org/commit/email-ext-plugin/7ba282f904ebdf52cd2241a1a41307b9e13b248e Log: Fix JENKINS-15442 Removed check for triggers to determine configured state.
          Hide
          raffenet Ken Raffenetti added a comment -

          > No, if there are no triggers, no email will be sent.

          I guess I had assumed this, as well. I had it in my mind that triggers were for overrides. In fact, I want the same email for all runs of my job, no matter the result. Shall I open a feature request that would add functionality for this? I'd rather not have to add all triggers every time.

          Show
          raffenet Ken Raffenetti added a comment - > No, if there are no triggers, no email will be sent. I guess I had assumed this, as well. I had it in my mind that triggers were for overrides. In fact, I want the same email for all runs of my job, no matter the result. Shall I open a feature request that would add functionality for this? I'd rather not have to add all triggers every time.
          Hide
          slide_o_mix Alex Earl added a comment -

          Please do open a feature request.

          Show
          slide_o_mix Alex Earl added a comment - Please do open a feature request.
          Hide
          slide_o_mix Alex Earl added a comment -

          Changed the way the plugin determines if it is configured or not.

          Show
          slide_o_mix Alex Earl added a comment - Changed the way the plugin determines if it is configured or not.
          slide_o_mix Alex Earl made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          iambaskar Baskaran D added a comment -

          Even I am facing the same issue. I do notice some exceptions (NPE) related to this email-ext plugin while booting up the jenkins. It may help to debug the issue.

          Apr 4, 2014 4:40:04 AM hudson.model.Descriptor load
          WARNING: Failed to load /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml
          hudson.util.IOException2: Unable to read /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml
          	at hudson.XmlFile.unmarshal(XmlFile.java:170)
          	at hudson.model.Descriptor.load(Descriptor.java:779)
          	at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.<init>(ExtendedEmailPublisherDescriptor.java:336)
          	at hudson.plugins.emailext.ExtendedEmailPublisher.<clinit>(ExtendedEmailPublisher.java:783)
          	at hudson.plugins.emailext.EmailExtensionPlugin.addEmailTriggerPlugin(EmailExtensionPlugin.java:77)
          	at hudson.plugins.emailext.EmailExtensionPlugin.start(EmailExtensionPlugin.java:58)
          	at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:377)
          	at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:366)
          	at hudson.PluginManager$2$1$1.run(PluginManager.java:355)
          	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
          	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
          	at jenkins.model.Jenkins$7.runTask(Jenkins.java:899)
          	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
          	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          	at java.lang.Thread.run(Thread.java:662)
          Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
          ---- Debugging information ----
          cause-exception     : java.lang.NullPointerException
          cause-message       : null
          class               : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          required-type       : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          converter-type      : hudson.util.RobustReflectionConverter
          path                : /hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          line number         : 22
          version             : not available
          -------------------------------
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
          	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
          	at hudson.util.XStream2.unmarshal(XStream2.java:109)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
          	at hudson.XmlFile.unmarshal(XmlFile.java:166)
          	... 16 more
          Caused by: java.lang.NullPointerException
          	at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:179)
          	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:312)
          	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
          	... 25 more
          Apr 4, 2014 4:40:04 AM ruby.RubyRuntimePlugin start
          
          Show
          iambaskar Baskaran D added a comment - Even I am facing the same issue. I do notice some exceptions (NPE) related to this email-ext plugin while booting up the jenkins. It may help to debug the issue. Apr 4, 2014 4:40:04 AM hudson.model.Descriptor load WARNING: Failed to load /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml hudson.util.IOException2: Unable to read /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml at hudson.XmlFile.unmarshal(XmlFile.java:170) at hudson.model.Descriptor.load(Descriptor.java:779) at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.<init>(ExtendedEmailPublisherDescriptor.java:336) at hudson.plugins.emailext.ExtendedEmailPublisher.<clinit>(ExtendedEmailPublisher.java:783) at hudson.plugins.emailext.EmailExtensionPlugin.addEmailTriggerPlugin(EmailExtensionPlugin.java:77) at hudson.plugins.emailext.EmailExtensionPlugin.start(EmailExtensionPlugin.java:58) at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:377) at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:366) at hudson.PluginManager$2$1$1.run(PluginManager.java:355) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null ---- Debugging information ---- cause-exception : java.lang.NullPointerException cause-message : null class : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor required-type : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor converter-type : hudson.util.RobustReflectionConverter path : /hudson.plugins.emailext.ExtendedEmailPublisherDescriptor line number : 22 version : not available ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061) at hudson.util.XStream2.unmarshal(XStream2.java:109) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045) at hudson.XmlFile.unmarshal(XmlFile.java:166) ... 16 more Caused by: java.lang.NullPointerException at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:179) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:312) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ... 25 more Apr 4, 2014 4:40:04 AM ruby.RubyRuntimePlugin start
          Hide
          slide_o_mix Alex Earl added a comment -

          This looks like a completely different problem. Please post your hudson.plugins.emailext.ExtendedEmailPublisher.xml file.

          Show
          slide_o_mix Alex Earl added a comment - This looks like a completely different problem. Please post your hudson.plugins.emailext.ExtendedEmailPublisher.xml file.
          Hide
          iambaskar Baskaran D added a comment -

          @Alex Earl - Currently, I upgraded my email-ext plugin to v2.34, where i am not seeing this problem.

          I got this when I followed the workaround provided by Jhon Cruz and restarted my jenkins.

          However..

          Current content in hudson.plugins.emailext.ExtendedEmailPublisher.xml file
          <?xml version='1.0' encoding='UTF-8'?>
          <hudson.plugins.emailext.ExtendedEmailPublisherDescriptor plugin="email-ext@2.34">
            <hudsonUrl>http://ci.net/</hudsonUrl>
            <adminAddress>Jenkins@test.com</adminAddress>
            <smtpHost>gmail-smtp-in.l.google.com</smtpHost>
            <useSsl>false</useSsl>
            <defaultContentType>text/plain</defaultContentType>
            <defaultSubject>$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!</defaultSubject>
            <defaultBody>$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:&#xd;
          &#xd;
          Check console output at $BUILD_URL to view the results.</defaultBody>
            <defaultPresendScript></defaultPresendScript>
            <maxAttachmentSize>-1</maxAttachmentSize>
            <recipientList></recipientList>
            <defaultReplyTo></defaultReplyTo>
            <excludedCommitters></excludedCommitters>
            <overrideGlobalSettings>true</overrideGlobalSettings>
            <precedenceBulk>false</precedenceBulk>
            <debugMode>false</debugMode>
            <enableSecurity>false</enableSecurity>
            <enableWatching>false</enableWatching>
          </hudson.plugins.emailext.ExtendedEmailPublisherDescriptor>
          

          I cannot downgrade again now.

          Show
          iambaskar Baskaran D added a comment - @ Alex Earl - Currently, I upgraded my email-ext plugin to v2.34, where i am not seeing this problem. I got this when I followed the workaround provided by Jhon Cruz and restarted my jenkins. However.. Current content in hudson.plugins.emailext.ExtendedEmailPublisher.xml file <?xml version= '1.0' encoding= 'UTF-8' ?> <hudson.plugins.emailext.ExtendedEmailPublisherDescriptor plugin= "email-ext@2.34" > <hudsonUrl> http://ci.net/ </hudsonUrl> <adminAddress> Jenkins@test.com </adminAddress> <smtpHost> gmail-smtp-in.l.google.com </smtpHost> <useSsl> false </useSsl> <defaultContentType> text/plain </defaultContentType> <defaultSubject> $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS! </defaultSubject> <defaultBody> $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:&#xd; &#xd; Check console output at $BUILD_URL to view the results. </defaultBody> <defaultPresendScript> </defaultPresendScript> <maxAttachmentSize> -1 </maxAttachmentSize> <recipientList> </recipientList> <defaultReplyTo> </defaultReplyTo> <excludedCommitters> </excludedCommitters> <overrideGlobalSettings> true </overrideGlobalSettings> <precedenceBulk> false </precedenceBulk> <debugMode> false </debugMode> <enableSecurity> false </enableSecurity> <enableWatching> false </enableWatching> </hudson.plugins.emailext.ExtendedEmailPublisherDescriptor> I cannot downgrade again now.
          Hide
          slide_o_mix Alex Earl added a comment -

          Version 2.34 is still pretty old. Everything looks fine in the file. If you are no longer seeing the issue, then I won't worry.

          Show
          slide_o_mix Alex Earl added a comment - Version 2.34 is still pretty old. Everything looks fine in the file. If you are no longer seeing the issue, then I won't worry.
          Hide
          iambaskar Baskaran D added a comment -

          No more updates available on jenkins pluginManager page. This might be because my Jenkins is running on ver. 1.532.

          Show
          iambaskar Baskaran D added a comment - No more updates available on jenkins pluginManager page. This might be because my Jenkins is running on ver. 1.532.
          Hide
          slide_o_mix Alex Earl added a comment -

          Could be, if you were running LTS (1.532.x), it would be up to 2.37.2.2

          Show
          slide_o_mix Alex Earl added a comment - Could be, if you were running LTS (1.532.x), it would be up to 2.37.2.2
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 146176 ] JNJira + In-Review [ 191813 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              frido82 Federico Paolantoni
            • Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: