-
Bug
-
Resolution: Fixed
-
Critical
-
Email-ext plugin version 2.24.1 / 2.25
Jenkins version LTS 1.446.2 / LTS 1.480.2
-
Powered by SuggestiMate
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.
- issue_snapshot.png
- 71 kB
- ext-email.jpg
- 110 kB
[JENKINS-15442] email-ext plugin does not save configuration on job
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
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
Are there any exceptions in the Jenkins log? I can't replicate this issue.
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
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.
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.
I have no idea what a strawboss job is. Can you point me to information?
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
There have been several changes to email-ext in that time, it's possible that Strawboss needs to be updated to correct this issue.
Thank Alex! I just want to monitor external job (linux crontab) with sending email on job failure. Do you have any ideas?
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.
Just to confirm this bug.
Jenkins: 1.480.2 LTS (deployed in Tomcat 7); Email-ext plugin 2.25
@Dejan - With strawboss or normal job? I am unable to replicate this even with running in Tomcat.
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.
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
@Alex: our replies jsut crossed
Thanx man, I will try to digg deeper and will let you know what I found.
Regards !
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
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.
I have the same problem with the configuration option 'trigger for matrix projects';
again the option is not stored in config.xml.
@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?
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 ... :-/
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.
I'm using the latest version in my setup at work with no issues, not sure how to debug the issue.
@Alex, sorry
We also had trouble finding this bug report because $DEFAULT_RECIPIENTS was spelled incorrectly in the report.
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.
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?
No errors in the Jenkins logs? No errors in the is console of the browser?
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.
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>
@ Alex Earl, I would be interested in testing your new plugin version if you can let me know where to access it from.
Please try the hpi from here https://buildhive.cloudbees.com/job/jenkinsci/job/email-ext-plugin/org.jenkins-ci.plugins$email-ext/198/
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!
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.
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.
Yes, I have a fix for this issue and will push it and do a release soon.
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.
I would have thought that if no triggers were set, the email should be sent for all job end types.
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.
> 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.
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
This looks like a completely different problem. Please post your hudson.plugins.emailext.ExtendedEmailPublisher.xml file.
@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..
<?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:
 
 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.
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.
No more updates available on jenkins pluginManager page. This might be because my Jenkins is running on ver. 1.532.
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.