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

Email notification hangs due to NullPointerException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      Windows 2008 Server x64, Java 1.6.0_25
    • Similar Issues:

      Description

      We have an email notification which uses a Jelly template. So far it worked ok, but recently we started getting these:
      Jan 25, 2012 2:11:23 PM hudson.plugins.emailext.ExtendedEmailPublisher sendMail
      WARNING: Could not send email.
      java.lang.NullPointerException
      at hudson.model.Slave.createLauncher(Slave.java:311)
      at hudson.plugins.perforce.PerforceMailResolver.findMailAddressFor(PerforceMailResolver.java:60)
      at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:100)
      at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:488)
      at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:331)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:251)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:243)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:203)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:694)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:669)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:647)
      at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
      at hudson.model.Run.run(Run.java:1448)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

        Attachments

          Activity

          Hide
          shinsato shinsato added a comment -

          The fix for 13317 prevented null values for default subject and body fields which I thought might be related - but it isn't.

          The line of code that is causing a NullPointerException is return line in Slave:

          public Launcher createLauncher(TaskListener listener)

          { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); }

          The only thing that could cause a NPE are the dereferences of c, which is the computer. Something has gotten pretty broken in the configuration for Slave.getComputer() to return null. I'd agree I doubt this is the email-ext plugin.

          Show
          shinsato shinsato added a comment - The fix for 13317 prevented null values for default subject and body fields which I thought might be related - but it isn't. The line of code that is causing a NullPointerException is return line in Slave: public Launcher createLauncher(TaskListener listener) { SlaveComputer c = getComputer(); return new RemoteLauncher(listener, c.getChannel(), c.isUnix()).decorateFor(this); } The only thing that could cause a NPE are the dereferences of c, which is the computer. Something has gotten pretty broken in the configuration for Slave.getComputer() to return null. I'd agree I doubt this is the email-ext plugin.
          Hide
          slide_o_mix Alex Earl added a comment -

          Probably similar to JENKINS-13102

          Show
          slide_o_mix Alex Earl added a comment - Probably similar to JENKINS-13102
          Hide
          slide_o_mix Alex Earl added a comment -

          Can you please post the entire build log?

          Show
          slide_o_mix Alex Earl added a comment - Can you please post the entire build log?
          Hide
          ccaraivan Costin Caraivan added a comment - - edited

          Unfortunately I do not have the build log anymore. From what I remember the output was:

          Sending email to: $OUR-CONFIGURED-RECIPIENTS

          Then nothing and the build would get stuck.
          We're not getting the NPE anymore after an upgrade of the Perforce plugin, so you can close this.

          Show
          ccaraivan Costin Caraivan added a comment - - edited Unfortunately I do not have the build log anymore. From what I remember the output was: Sending email to: $OUR-CONFIGURED-RECIPIENTS Then nothing and the build would get stuck. We're not getting the NPE anymore after an upgrade of the Perforce plugin, so you can close this.
          Hide
          ccaraivan Costin Caraivan added a comment -

          Not getting NPEs after an upgrade of the Perforce plugin.

          Show
          ccaraivan Costin Caraivan added a comment - Not getting NPEs after an upgrade of the Perforce plugin.

            People

            • Assignee:
              Unassigned
              Reporter:
              ccaraivan Costin Caraivan
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: