2
votes

Jenkins version 2.177. Build Name Setter Plugin version 2.0.0.

I have recently installed new Jenkins version and plugins. The build jobs are now failing with the exception shown bellow (it gets printed to Jenkins console). It was running well last week

1:17:12 FATAL: org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'BUILD_USER_ID' in '#147_${BUILD_USER_ID}'
11:17:12 org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'BUILD_USER_ID' in '#147_${BUILD_USER_ID}'
11:17:12    at org.jenkinsci.plugins.tokenmacro.Parser.processToken(Parser.java:343)
11:17:12    at org.jenkinsci.plugins.tokenmacro.Action$KiHW1UeqOdqAwZul.run(Unknown Source)
11:17:12    at org.parboiled.matchers.ActionMatcher.match(ActionMatcher.java:96)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.matchers.ZeroOrMoreMatcher.match(ZeroOrMoreMatcher.java:39)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77)
11:17:12    at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351)
11:17:12    at org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72)
11:17:12    at org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86)
11:17:12    at org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66)
11:17:12    at org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:81)
11:17:12    at org.parboiled.parserunners.AbstractParseRunner.run(AbstractParseRunner.java:76)
11:17:12    at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:85)
11:17:12    at org.jenkinsci.plugins.tokenmacro.Parser.process(Parser.java:74)
11:17:12    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:199)
11:17:12    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:237)
11:17:12    at org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(TokenMacro.java:207)
11:17:12    at org.jenkinsci.plugins.buildnamesetter.Executor.evaluateMacro(Executor.java:54)
11:17:12 Caused: java.lang.IllegalArgumentException
11:17:12    at org.jenkinsci.plugins.buildnamesetter.Executor.evaluateMacro(Executor.java:56)
11:17:12    at org.jenkinsci.plugins.buildnamesetter.Executor.setName(Executor.java:28)
11:17:12    at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setUp(BuildNameSetter.java:84)
11:17:12    at hudson.model.Build$BuildExecution.doRun(Build.java:157)
11:17:12    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
11:17:12    at hudson.model.Run.execute(Run.java:1818)
11:17:12    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
11:17:12    at hudson.model.ResourceController.execute(ResourceController.java:97)
11:17:12    at hudson.model.Executor.run(Executor.java:429)

Jenkins is running with JDK 1.8, on Ubuntu 18 LTS server

The problem is somehow caused by Build Name Setter Plugin (https://wiki.jenkins.io/display/JENKINS/Build+Name+Setter+Plugin). The build job will work if I disable this plugin (Job Configuration > Build Environment > uncheck Set Build Name)

1

1 Answers

1
votes

There is some issue with Build Name Setter Plugin was version 2.0.0, that was installed on the Jenkins server.

I downgraded to 1.7.1, restarted Jenkins, and the error is not seen anymore.