- There is a pipeline stuck executing and I am unable to stop it from executing
- CloudBees Jenkins Enterprise - Managed Master (CJE-MM)
- CloudBees Jenkins Enterprise - Operations Center (CJE-OC)
- CloudBees Jenkins Team (CJT)
- CloudBees Jenkins Platform - Client Master (CJP-CM)
- CloudBees Jenkins Platform - Operations Center (CJP-OC)
- Jenkins LTS
- Pipeline Plugin
- Durable Task Plugin
This issue can be caused a number of ways but the most likely one is that an older version of the Durable Task plugin is installed and it has not picked up the fix released in JENKINS-47791.
In order to resolve this in the most efficient way possible, this is the correct order of operations:
1. Hit the red X in the UI to stop the build:
2. After 30 seconds of the build not stopping that should generate a link in the??Console??of the build which says “Click here to forcibly terminate running steps” or on the sidebar link like shown here:
If you see the link and click it but that does not stop the build, move on to 3. If you don’t see the link after a refresh of the page then move to 4.???
3. If the previous step didn’t work then a new link should appear in that same console and on the sidebar after another 30 seconds which says “Click here to forcibly kill entire build” and clicking that should kill the build.???
4. If you are not seeing that link or number 3 does not work then try adding /kill to the URL of the job. This would mean your job URL looks like??
$JENKINS_URL/job/PipelineKillTest/1/??and you just add??kill??to the end of the url. That will perform the same function as??
Click here to forcibly kill entire build link from before.???
5. If those does not work then the next step will require a restart. You will need to stop Jenkins and move that build away from the filesystem which will be inside of
$JENKINS_HOME/jobs/$JOB/$BUILD_NUMBER. Once that has been removed from your $JENKINS_HOME you can restart Jenkins and the build should be gone.
6. It is possible that in very rare circumstances (which appears to happen more often on older versions of the pipeline plugins) the build will still exist on the
org.jenkinsci.plugins.workflow.flow.FlowExecutionList.xml file and try to resume after deleting the build folder. If this happens the build number which looks like:
<flow-owner plugin="firstname.lastname@example.org"> <job>$EXAMPLE_JOB</job> <id>$BUILD_NUMBER</id> </flow-owner>
needs to be removed from that file and restarted again.
7. If none of this works then please follow the suggestions from Required data in pipeline hangs article.
If the issue was in fact the Durable Task issue then you should ensure that your Durable Task plugin has been updated to the latest version.