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

    • 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)
      

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

          Daniel Beck added a comment -

          Daniel Beck added a comment - This is probably more of a core issue, see https://github.com/jenkinsci/subversion-plugin/pull/83#issuecomment-44050410

          Andrew Bayer added a comment -

          Gotcha - Jesse, is this going to be fixed?

          Andrew Bayer added a comment - Gotcha - Jesse, is this going to be fixed?

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/tools/InstallerTranslator.java
          test/src/test/java/hudson/tools/InstallerTranslatorTest.java
          http://jenkins-ci.org/commit/jenkins/3e44e1365e0d20ac77c914c3372767182735f616
          Log:
          [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/tools/InstallerTranslator.java test/src/test/java/hudson/tools/InstallerTranslatorTest.java http://jenkins-ci.org/commit/jenkins/3e44e1365e0d20ac77c914c3372767182735f616 Log: [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3483
          [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves. (Revision 3e44e1365e0d20ac77c914c3372767182735f616)

          Result = SUCCESS
          Jesse Glick : 3e44e1365e0d20ac77c914c3372767182735f616
          Files :

          • test/src/test/java/hudson/tools/InstallerTranslatorTest.java
          • core/src/main/java/hudson/tools/InstallerTranslator.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3483 [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves. (Revision 3e44e1365e0d20ac77c914c3372767182735f616) Result = SUCCESS Jesse Glick : 3e44e1365e0d20ac77c914c3372767182735f616 Files : test/src/test/java/hudson/tools/InstallerTranslatorTest.java core/src/main/java/hudson/tools/InstallerTranslator.java changelog.html

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/tools/InstallerTranslator.java
          test/src/test/java/hudson/tools/InstallerTranslatorTest.java
          http://jenkins-ci.org/commit/jenkins/74e774e565be167c74683f9541d9310cb259889b
          Log:
          [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves.
          (cherry picked from commit 3e44e1365e0d20ac77c914c3372767182735f616)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/tools/InstallerTranslator.java test/src/test/java/hudson/tools/InstallerTranslatorTest.java http://jenkins-ci.org/commit/jenkins/74e774e565be167c74683f9541d9310cb259889b Log: [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves. (cherry picked from commit 3e44e1365e0d20ac77c914c3372767182735f616) Conflicts: changelog.html

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

              Created:
              Updated:
              Resolved: