JIRA Trigger Plugin: One job could not be triggered simultaneously by two Jira issue event

531 views Asked by At

During daily work, I am using JIRA Trigger Plugin to trigger Jenkins job when Jira issue status change. Teammate creates two Jira issues based same issue type, then he change issue status almost at the same time. We can see "Build is scheduled for ..." comment in both issues. But only one Jenkins job build was triggered.

After enable Jenkins logging at FINE level for troubleshooting, log as below:

Sep 05, 2017 5:16:12 PM WARNING jenkins.model.lazy.LazyBuildMixIn newBuild A new build could not be created in job Jira_Project_Feature_Updator java.lang.IllegalStateException: JENKINS-23152: /var/lib/jenkins/jobs/Jira_Project_Feature_Updator/builds/181 already existed; will not overwrite with Jira_Project_Feature_Updator #181 at hudson.model.RunMap.put(RunMap.java:188) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:185) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1019) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1218) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:145) at hudson.model.Executor$1.call(Executor.java:358) at hudson.model.Executor$1.call(Executor.java:340) at hudson.model.Queue._withLock(Queue.java:1362) at hudson.model.Queue.withLock(Queue.java:1223) at hudson.model.Executor.run(Executor.java:340)

Sep 05, 2017 5:16:12 PM SEVERE hudson.model.Executor run Unexpected executor death java.lang.Error: java.lang.IllegalStateException: JENKINS-23152: /var/lib/jenkins/jobs/Jira_Project_Feature_Updator/builds/181 already existed; will not overwrite with Jira_Project_Feature_Updator #181 at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:193) at hudson.model.AbstractProject.newBuild(AbstractProject.java:1019) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1218) at hudson.model.AbstractProject.createExecutable(AbstractProject.java:145) at hudson.model.Executor$1.call(Executor.java:358) at hudson.model.Executor$1.call(Executor.java:340) at hudson.model.Queue._withLock(Queue.java:1362) at hudson.model.Queue.withLock(Queue.java:1223) at hudson.model.Executor.run(Executor.java:340) Caused by: java.lang.IllegalStateException: JENKINS-23152: /var/lib/jenkins/jobs/Jira_Project_Feature_Updator/builds/181 already existed; will not overwrite with Jira_Project_Feature_Updator #181 at hudson.model.RunMap.put(RunMap.java:188) at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:185) ... 8 more

I simply think it’s because the first change event trigger job build #181, and the second event also want to run build #181, but it's already existed.

I am not sure these result is related to my configuration or the plugin. The plugin works well except this problem.

Below is my version info:

  • Jenkins: 2.19.3
  • Jira: v6.3.6#6336-sha1:cf1622c
  • JIRA Trigger Plugin: 0.4.1 & 0.4.3-SNAPSHOT

I also try the latest plugin release https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fjira-trigger-plugin/detail/master/10/artifacts/, but the result is the same.

0

There are 0 answers