mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Jenkins slave executors die when trigger is made for matrix configuration project #111

Closed MoreSolutions closed 9 years ago

MoreSolutions commented 9 years ago

Whenever the hook sends a trigger to Jenkins for a matrix configuration project, I always see one executor in the associated slaves die. This only happens during the trigger because manual builds from Jenkins work perfectly fine. Instead, I need to login to Jenkins and restart the executor threads.

It seems like this hook is actually triggering two builds at the same time, so one of them immediately fails because of a repeated build directory.

The error message is shown below for each slave.

java.lang.IllegalStateException: E:\jobs\jobname-all-develop\configurations\axis-label\labelname\builds\24 already existed; will not overwite with jobname-all-develop/label=labelnode #24
    at hudson.model.RunMap.put(RunMap.java:187)
    at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:284)
    at hudson.matrix.MatrixConfiguration.newBuild(MatrixConfiguration.java:74)
    at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1205)
    at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144)
    at hudson.model.Executor.run(Executor.java:213)

I am running Jenkins 1.602 with the latest versions of the Jenkins git plugin and this Stash webhook.

Do you have any suggestions?

mikesir87 commented 9 years ago

Sorry for taking a month to get back to you. Is this still an issue you're wrestling with?

elgalu commented 9 years ago

I'm having this issue, also described and unresolved at http://jenkins-ci.361315.n4.nabble.com/JIRA-core-JENKINS-26582-Unexpected-Executor-Death-build-already-existed-1-597-td4735758i20.html

Jenkins ver. 1.609.1 Stash Webhook to Jenkins 2.7.0

@MoreSolutions why did you just close this issue without further details? did you solve it? how?

elgalu commented 9 years ago

More info: Only jobs using Matrix+Project+Plugin fail.

elgalu commented 9 years ago

I think the issue is that this plugin is not setting the env var GIT_BRANCH, is just setting GIT_COMMIT