The problem that a process initiated by the Execute shell in Jenkins will be killed

Source: Internet
Author: User

When you configure the Automatic Updates deployment project in Jenkins, you can turn tomcat off if you take the Execute shell to start/close Tomcat,

However, Tomcat could not be started, although the build would show that the execution was successful, but the view process was not started by Tomcat. This is because the Jenkins default

Kill all the spawned processes after the build is finished. The following configuration is required to avoid this situation:

1. Reset the environment variable build_id

Adding Build_id=dontkillme to the Execute Shell input box prevents Jenkins from killing the started Tomcat process

 

2. Prohibit Jenkins from killing the derivative process when starting Jenkins

Modify the/etc/sysconfig/jenkins configuration to add-dhudson.util.processtree.disable=true to the jenkins_java_options.

Need to restart Jenkins to take effect

Once this method is configured, all jobs do not have to be set build_id to prevent Jenkins from killing the booted Tomcat process

<wiz_tmp_tag id= "Wiz-table-range-border" contenteditable= "false" style= "Display:none;" >

The problem that a process initiated by the Execute shell in Jenkins will be killed

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.