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

email-ext plugin doesn't handle tokens when slave has gone offline: IAE from AbstractProject.getEnvironment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • Jenkins 1.532.2, email-ext 2.38, token-macro 1.10

      We've been having a problem lately with some of our cloud slaves getting killed during the build - when this happens, email-ext/token-macro fails to actually transform any tokens, ending up with a useless email. Here's the stacktrace from the logs:

      Jun 20, 2014 2:34:35 AM hudson.plugins.emailext.plugins.ContentBuilder transformText
      SEVERE: null
      java.lang.IllegalArgumentException: Node ec2-beefy-slave-406.vpc.cloudera.com seems to be offline
              at hudson.tools.ToolInstaller.preferredLocation(ToolInstaller.java:120)
              at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:109)
              at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
              at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
              at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204)
              at hudson.model.JDK.forNode(JDK.java:126)
              at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:359)
              at hudson.model.Run.getEnvironment(Run.java:2173)
              at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:914)
              at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:229)
              at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:71)
              at hudson.plugins.emailext.ExtendedEmailPublisher.setSubject(ExtendedEmailPublisher.java:585)
              at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:473)
              at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:290)
              at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:281)
              at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:233)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
              at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
              at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
              at hudson.model.Run.execute(Run.java:1710)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
              at hudson.model.ResourceController.execute(ResourceController.java:88)
              at hudson.model.Executor.run(Executor.java:246)
      

            jglick Jesse Glick
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: