Tomcat script not working when run from Hudson Tomcat script not working when run from Hudson jenkins jenkins

Tomcat script not working when run from Hudson


Try unsetting the BUILD_ID in your 'shell execute' block. You might even not need to use nohup in this case

BUILD_ID=./your_hudson_script_that_starts_tomcat.sh


Without seeing your script it is difficult to give an exact answer. However you could try adding the following to the start of your script (assuming it is a bash script):

# Trace executed commands.set -x# Save stdout / stderr in filesexec >/tmp/my_script.stdoutexec 2>/tmp/my_script.stderr

You could also try adding

set -e

to make the shell exit immediately if a command returns an error status.

If it looks as though Hudson is killing off Tomcat then you might want to run it within nohup (if you're not already doing that):

nohup bin/startup.sh >/dev/null 2>&1 &