Jenkins the process that was started by the execute shell will be killed (other processes) _jenkins

Source: Internet
Author: User

Today, there is a problem with automating Jenkins deployments. I will kill other processes while executing the shell script, and this process is no longer executing, looking for resources and finding an article.


This is because Jenkins by default will kill all the derivative processes after the build is finished.

Workaround:

1. Reset environment variable build_id

Add Build_id=dontkillme to the Execute shell input box to prevent Jenkins from killing the startup Java process

2. Prohibit Jenkins from killing the derivative process when initiating Jenkins (this method is not tested and is one of the solutions)

Modify the/etc/sysconfig/jenkins configuration and add-dhudson.util.processtree.disable=true to the jenkins_java_options. Need to reboot Jenkins to take effect

Once this method is configured once, all jobs do not need to set build_id to prevent Jenkins from killing the started Java process

Picture Original Url:https://wiki.jenkins.io/display/jenkins/processtreekiller



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.