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

          Andrew Bayer created issue -

          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?
          Andrew Bayer made changes -
          Component/s New: core [ 15593 ]
          Assignee Original: Alex Earl [ slide_o_mix ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-23007 [ JENKINS-23007 ]
          Jesse Glick made changes -
          Summary Original: email-ext plugin doesn't handle tokens when slave has gone offline New: email-ext plugin doesn't handle tokens when slave has gone offline: IAE from AbstractProject.getEnvironment
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Component/s Original: email-ext [ 15538 ]
          Component/s Original: token-macro [ 15832 ]
          Labels New: lts-candidate robustness

          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.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: