start daemon on remote server via Jenkins SSH shell script exits mysteriously -


i have build job on jenkins building project , after done, opens ssh shell script on remote server , transfers files , stop , starts daemon.

when stop , start daemon command line on rhel server, executes fine. when job executes in jenkins, there no errors.

the daemon stops fine , starts fine. shortly after starting, daemon dies suddenly.

sudo service daemonname stop # transfer files. sudo service daemonname start 

i'm sure problem isn't pathing

does know special way jenkins executing ssh shell script cause daemon start not complete?

the problem: when executing build through jenkins, command start daemon process executing, yet after build job done, daemon quit.

the solution: thought whole time jenkins killing daemon. tried many different incarnations , permutations of disabling processtree module goes through , cleans zombie child processes. tried fooling resetting build_id environment variable. nothing worked.

thanks thread found out that solution works child processes executed on build machine. i.e. not applicable problem.

more searching led me here: run persistent process via ssh

the solution? nohup.

so build restarts daemon executing following: sudo nohup service daemonname start


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -