I have a jenkins multijob project.
In 1st phase, I start databases and build core part.
sample shell command to start Mongodb:
/root/software/mongodb-linux-x86_64-2.6.3/bin/mongod&
In 2nd phase, I have various jobs to build some clients.
After 1st phase job, after starting servers and building core part. I see logs-
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
2016-08-26T20:23:00.815+0530 [signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends
2016-08-26T20:23:00.833+0530 [signalProcessingThread] now exiting
2016-08-26T20:23:00.879+0530 [signalProcessingThread] dbexit:
2016-08-26T20:23:00.903+0530 [signalProcessingThread] shutdown: going to close listening sockets...
2016-08-26T20:23:00.903+0530 [signalProcessingThread] closing listening socket: 7
2016-08-26T20:23:00.903+0530 [signalProcessingThread] closing listening socket: 8
2016-08-26T20:23:00.903+0530 [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
Finished: SUCCESS
This is stopping all the databases and build is failing for phase2 jobs.
How to tell jenkins not to kill processes after a job?
As per the docs shared by @jayan,
You can disable killing processes spawned by a job during a build by setting a Java property named hudson.util.ProcessTree.disable
to the value true
.
This can be done as a parameter to the "java" binary when starting Jenkins:
java -Dhudson.util.ProcessTree.disable=true -jar jenkins.war