• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major

      Since the last upgrade to Jenkins 2.361.1 including all plugins (see environment), the e-mail notification for nodes going offline/online does not work anymore. The test mails and mails sent with the "mail" or "emailext" steps to the same recipients still work as expected.
      A downgrade to

      JavaMail API 1.6.2-7
      Job Configuration History 1133 ...,
      Mail Watcher 1.16
      Mailer 408.vd72...

      also makes it work again.

          [JENKINS-69831] No notification on offline/online node

          Hi

          was about to upgrade to 2.361 LTS, and before just did a complete plugins upgrade, which included Mail Watcher.

          Issue is also showing on 2.346.3 LTS, so i don't think it is related to jenkins core.

          Now we are seing following exception in Jenkins logs at startup, which seems very related to this issue. Also confirming that mail notification does not work anymore for node offline/online status change.

          [2022-11-17 12:19:36.465] [WARNING] [hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error] Failed to instantiate Key[type=org.jenkinsci.plugins.mailwatcher.WatcherComputerListener, annotation=[none]]; skipping this component com.google.inject.ProvisionException: Unable to provision, see the following errors:1) [Guice/ErrorInjectingConstructor]: ClassCastException: class hudson.Plugin$DummyImpl cannot be cast to class hudson.plugins.jobConfigHistory.JobConfigHistory (hudson.Plugin$DummyImpl is in unnamed module of loader WebAppClassLoader @19553973; hudson.plugins.jobConfigHistory.JobConfigHistory is in unnamed module of loader AntClassLoader @43ee4bea)

          at WatcherComputerListener.<init>(WatcherComputerListener.java:55)

          Learn more:[ https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR|https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR]

          1 error

          ======================
          Full classname legend:
          ======================
          AntClassLoader: "jenkins.util.AntClassLoader"
          WatcherComputerListener: "org.jenkinsci.plugins.mailwatcher.WatcherComputerListener"
          WebAppClassLoader: "org.eclipse.jetty.webapp.WebAppClassLoader"

          ========================
          End of classname legend:
          ========================

          at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
          at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
          at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
          at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:444)
          at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
          at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100)
          at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:402)
          at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:393)
          at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:358)
          at hudson.ExtensionList.load(ExtensionList.java:384)
          at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
          at hudson.ExtensionList.iterator(ExtensionList.java:172)
          at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:295)
          at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
          at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
          Caused by: java.lang.ClassCastException: class hudson.Plugin$DummyImpl cannot be cast to class hudson.plugins.jobConfigHistory.JobConfigHistory (hudson.Plugin$DummyImpl is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @19553973; hudson.plugins.jobConfigHistory.JobConfigHistory is in unnamed module of loader jenkins.util.AntClassLoader @43ee4bea)
          at org.jenkinsci.plugins.mailwatcher.MailWatcherMailer.<init>(MailWatcherMailer.java:66)
          at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener.<init>(WatcherComputerListener.java:56)
          at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener$$FastClassByGuice$$941276973.GUICE$TRAMPOLINE(<generated>)
          at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener$$FastClassByGuice$$941276973.apply(<generated>)
          at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
          at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
          at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33)
          at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98)
          at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
          at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:568)
          at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117)
          at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66)
          at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93)
          at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
          at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
          ... 17 more

          Geoffroy Jabouley added a comment - Hi was about to upgrade to 2.361 LTS, and before just did a complete plugins upgrade, which included Mail Watcher. Issue is also showing on 2.346.3 LTS, so i don't think it is related to jenkins core. Now we are seing following exception in Jenkins logs at startup, which seems very related to this issue. Also confirming that mail notification does not work anymore for node offline/online status change. [2022-11-17 12:19:36.465] [WARNING] [hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error] Failed to instantiate Key[type=org.jenkinsci.plugins.mailwatcher.WatcherComputerListener, annotation= [none] ]; skipping this component com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) [Guice/ErrorInjectingConstructor] : ClassCastException: class hudson.Plugin$DummyImpl cannot be cast to class hudson.plugins.jobConfigHistory.JobConfigHistory (hudson.Plugin$DummyImpl is in unnamed module of loader WebAppClassLoader @19553973; hudson.plugins.jobConfigHistory.JobConfigHistory is in unnamed module of loader AntClassLoader @43ee4bea) at WatcherComputerListener.<init>(WatcherComputerListener.java:55) Learn more:[ https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR |https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR] 1 error ====================== Full classname legend: ====================== AntClassLoader: "jenkins.util.AntClassLoader" WatcherComputerListener: "org.jenkinsci.plugins.mailwatcher.WatcherComputerListener" WebAppClassLoader: "org.eclipse.jetty.webapp.WebAppClassLoader" ======================== End of classname legend: ======================== at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169) at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:444) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45) at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:402) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:393) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:358) at hudson.ExtensionList.load(ExtensionList.java:384) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320) at hudson.ExtensionList.iterator(ExtensionList.java:172) at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:295) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.ClassCastException: class hudson.Plugin$DummyImpl cannot be cast to class hudson.plugins.jobConfigHistory.JobConfigHistory (hudson.Plugin$DummyImpl is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @19553973; hudson.plugins.jobConfigHistory.JobConfigHistory is in unnamed module of loader jenkins.util.AntClassLoader @43ee4bea) at org.jenkinsci.plugins.mailwatcher.MailWatcherMailer.<init>(MailWatcherMailer.java:66) at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener.<init>(WatcherComputerListener.java:56) at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener$$FastClassByGuice$$941276973.GUICE$TRAMPOLINE(<generated>) at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener$$FastClassByGuice$$941276973.apply(<generated>) at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:33) at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:98) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.onProvision(ExtensionFinder.java:568) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:117) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:66) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:93) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ... 17 more

          Geoffroy Jabouley added a comment - - edited

          Investigated a bit, narrowed down to Job Configuration History plugin

          Version 1171.v04b_66d78555e is fine

          Version 1176.v1b_4290db_41a_5 is breaking the use case

          There might be some incompatibly introduced in this plugin, making fail its interactions with Mail Watcher plugin (not really supported anymore btw...)

          Geoffroy Jabouley added a comment - - edited Investigated a bit, narrowed down to Job Configuration History plugin Version 1171.v04b_66d78555e is fine Version 1176.v1b_4290db_41a_5 is breaking the use case There might be some incompatibly introduced in this plugin, making fail its interactions with Mail Watcher plugin (not really supported anymore btw...)

          Just upgraded to LTS 2.361.4, and all plugins to latest available EXCEPT keeping version 1171.v04b_66d78555 of Job Config History plugin, and setup is working fine.

          Hopefully someone with better expertise can comment and provide guidance to fix the issue

          Geoffroy Jabouley added a comment - Just upgraded to LTS 2.361.4, and all plugins to latest available EXCEPT keeping version 1171.v04b_66d78555 of Job Config History plugin, and setup is working fine. Hopefully someone with better expertise can comment and provide guidance to fix the issue

          Suresh added a comment -

          Recently, we have upgraded all the Jenkins plugins and was facing same email notification on offline/online node. Investigated the issue and found the root cause. Identified the below plugins and downgraded the version then it started working fine for me. Hope this helps!!

          Email ExtensionVersion2.91

          Email Extension TemplateVersion1.4

          Jakarta Mail APIVersion2.0.1-1

          JavaMail APIVersion1.6.2-7

          MailerVersion435.v79ef3972b_5c7

          Mail Watcher PluginVersion1.17

          Suresh added a comment - Recently, we have upgraded all the Jenkins plugins and was facing same email notification on offline/online node. Investigated the issue and found the root cause. Identified the below plugins and downgraded the version then it started working fine for me. Hope this helps!! Email ExtensionVersion2.91 Email Extension TemplateVersion1.4 Jakarta Mail APIVersion2.0.1-1 JavaMail APIVersion1.6.2-7 MailerVersion435.v79ef3972b_5c7 Mail Watcher PluginVersion1.17

          Basil Crow added a comment -

          Caused by JENKINS-55667.

          Basil Crow added a comment - Caused by JENKINS-55667 .

          Basil Crow added a comment -

          Basil Crow added a comment - PR at https://github.com/jenkinsci/mail-watcher-plugin/pull/43

          Peter Bauer added a comment -

          Thanks a lot, works again now with the Mail Watcher Plugin 1.18 (tested with Jenkins LTS 2.375.1)!

          Peter Bauer added a comment - Thanks a lot, works again now with the Mail Watcher Plugin 1.18 (tested with Jenkins LTS 2.375.1)!

            alecharp Adrien Lecharpentier
            petermbauer Peter Bauer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: