Reputation: 141
I am trying to start Tomcat in my Jenkins job on a slave machine. I start Jenkins slave manually by opening slave-agent.jnlp
This is what I tried in Execute Windows Batch Command:
call C:\tomcat\bin\startup.bat
Tomcat starts on running the build and the build is marked successful but then Tomcat auto closes after few seconds.
Upvotes: 1
Views: 779
Reputation: 1
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller
Add the below environment variable to shell script, this also will fix the issue:
export BUILD_ID=dontKillMe
Upvotes: 0
Reputation: 27485
This is Jenkins Process Tree Killer in action. This is by design. You can either disable it globally for the whole Jenkins (not recommended) by starting Jenkins with extra parameter
-Dhudson.util.ProcessTree.disable=true
.
For Windows environment, you can use the at
command to schedule start of Tomcat (with 1 sec delay).
Upvotes: 3