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

mail watcher requires job config history plugin with Jenkins 2.387.1 and later

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • mail-watcher-plugin
    • None
    • NPE and PRD

      Post upgrade in production to v2.387.3 on restart, Jenkins is writing the below error to the err.log for the mailwatcher plugin:

      2023-06-15 15:34:03.002+0000 [id=24] WARNING h.ExtensionFinder$GuiceFinder$FaultTolerantScope$1#error: Failed to instantiate Key[type=org.jenkinsci.plugins.mailwatcher.WatcherItemListener, annotation=[none]]; skipping this component

      Now node status messages (offline/online) are not being sent via email when status changes. We upgraded our NPE Jenkins to the latest (v2.401.1) and the issue persists.

      There is no mention of this issue in the plugin docs and no warning of potential compatibility issues as the last release was ~4 months ago.

      Any fix/help/guidance is greatly appreciated - thanks in advance.

        1. plugins.txt
          1 kB
        2. plugins-1.txt
          4 kB
        3. run-jenkins.sh
          0.9 kB

          [JENKINS-71460] mail watcher requires job config history plugin with Jenkins 2.387.1 and later

          Chris added a comment -

          Hi Team,

          Any updates?

          TIA

          Chris added a comment - Hi Team, Any updates? TIA

          Mark Waite added a comment - - edited

          ctmiller it is a great help if you provide the details requested in "How to report an issue" so that others are more likely to give their time to assist. I know that I am much more interested in helping people when they provide details like the specific plugin versions they are running.

          I think that I was able to avoid the issue with the following steps:

          1. Define the list of plugins and their versions in a plugins.txt file (using the script from "How to report an issue")
          2. Create a run-jenkins.sh script that starts Jenkins and downloads those plugin versions
          3. Run the run-jenkins.sh script and choose to install no additional plugins
          4. Confirm that the issue is not reported

          I am able to duplicate the issue with the following steps:

          1. Perform the prior steps to create an initial installation
          2. Disable the job config history plugin (or remove it) and restart Jenkins
          3. Confirm that the issue is reported

          The crucial step in the failure is to remove the job config history plugin that is an optional dependency of the mail watcher plugin. I don't know why an optional dependency would fail in that way, but the workaround seems to work (at least it avoids the error message)

          The mail watcher plugin is up for adoption. If your organization depends on it, you should consider adopting the plugin, modernizing it, and releasing a new version. The plugin health score of the mail watcher plugin is only 76 / 100, so there is room for improvement for the plugin.

          Mark Waite added a comment - - edited ctmiller it is a great help if you provide the details requested in "How to report an issue" so that others are more likely to give their time to assist. I know that I am much more interested in helping people when they provide details like the specific plugin versions they are running. I think that I was able to avoid the issue with the following steps: Define the list of plugins and their versions in a plugins.txt file (using the script from "How to report an issue") Create a run-jenkins.sh script that starts Jenkins and downloads those plugin versions Run the run-jenkins.sh script and choose to install no additional plugins Confirm that the issue is not reported I am able to duplicate the issue with the following steps: Perform the prior steps to create an initial installation Disable the job config history plugin (or remove it) and restart Jenkins Confirm that the issue is reported The crucial step in the failure is to remove the job config history plugin that is an optional dependency of the mail watcher plugin. I don't know why an optional dependency would fail in that way, but the workaround seems to work (at least it avoids the error message) The mail watcher plugin is up for adoption. If your organization depends on it, you should consider adopting the plugin , modernizing it , and releasing a new version. The plugin health score of the mail watcher plugin is only 76 / 100, so there is room for improvement for the plugin.

          Chris added a comment -

          Hi Mark,

          Apologies in advance - I was unaware of the "How to report an issue" resource before I created this ticket - I will use it as a reference going forward.

          I've attached a plugins.txt file for reference AFTER applying the fix you suggested of adding the job config history plugin to both of my NPE controllers. I no longer see the Warning message in the err.log on Jenkins startup and node status emails for offline/online are once again working.  I'll continue to test but it looks good so far - thanks for the assist.

          To be very honest I don't have time for adopting any new projects, and since this issue was limited only to the mail watcher plugin, I'm really the only one that cared enough to pursue a fix because I use it. If we can update the plugin docs to reflect this issue I hope the directions that you provided can help someone else if they share the same experience in their environment(s).

          Please let me know if you need anything else from my side but I believe we should be good to close this issue as resolved.

          Chris added a comment - Hi Mark, Apologies in advance - I was unaware of the "How to report an issue" resource before I created this ticket - I will use it as a reference going forward. I've attached a plugins.txt file for reference AFTER applying the fix you suggested of adding the job config history plugin to both of my NPE controllers. I no longer see the Warning message in the err.log on Jenkins startup and node status emails for offline/online are once again working.  I'll continue to test but it looks good so far - thanks for the assist. To be very honest I don't have time for adopting any new projects, and since this issue was limited only to the mail watcher plugin, I'm really the only one that cared enough to pursue a fix because I use it. If we can update the plugin docs to reflect this issue I hope the directions that you provided can help someone else if they share the same experience in their environment(s). Please let me know if you need anything else from my side but I believe we should be good to close this issue as resolved.

          Mark Waite added a comment -

          Thanks ctmiller. I'd like to leave the issue open because installing an optional plugin is unexpected and is a workaround rather than fixing the root issue.

          Mark Waite added a comment - Thanks ctmiller . I'd like to leave the issue open because installing an optional plugin is unexpected and is a workaround rather than fixing the root issue.

          Chris added a comment -

          Sure markewaite - thanks again.

          Chris added a comment - Sure markewaite - thanks again.

            Unassigned Unassigned
            ctmiller Chris
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: