Pipeline - How to kill a pipeline job that is stuck executing

Issue

  • We tried to kill the job, but it doesn’t seem to have an impact. We have deleted the job, but the execution still appears in the list of running jobs in the ‘Build Executor Status’. How can we kill this execution?
  • Pipeline run will not terminate even with a cancel, or terminate.

Environment

  • Jenkins
  • CloudBees Jenkins Enterprise
  • Pipeline plugin

Resolution

Please upgrade to the latest version of all Pipeline Plugin which enables the ability to perform a hard kill operation when a pipeline operation is canceled.

If you cancel a build (via the red X) and the build will not stop or abort then after 15 seconds a Forcibly terminate running steps will appear in the console output of the build. If you click that and the build does not stop the build, then a Forcibly terminate the project button will appear which will allow you to foribly terminate all builds for the project.

If you encounter any of the Forcibly terminate options, and you are currently using the latest versions and you continue to encounter hangs in your pipeline scripts, then please file a new support ticket and attach a support bundle to investigate further.

References

Have more questions? Submit a request

4 Comments

  • 0
    Avatar
    Sthanunathan Pattabiraman

    what's the latest pipeline pugin version that has forcibly terminate option?

    Edited by Sthanunathan Pattabiraman
  • 1
    Avatar
    Denys Digtiar

    Hi Sthanunathan,

    The latest release of the Pipeline is 2.5 includes this option.

    Although, if you meant the earliest release where it is present then I believe it is 1.11

    https://github.com/jenkinsci/pipeline-plugin/blob/master/CHANGES.md#111-nov-12-2015

  • 0
    Avatar
    Sameet Nasnodkar

    I have the pipeline version 2.4 which is definitely more than 1.11 Still does not work for me.

  • 0
    Avatar
    Denys Digtiar

    Hi Sameet Nasnodkar,

    As we suggested, feel free to raise a support ticket if you are a CloudBees customer. Or engage a Jenkins user community on Mailing List, StackOverflow, or Chat.

Please sign in to leave a comment.