build job running forever when executing a script to start tomcat service
Summary
build job keep running when executing a script to start tomcat service. 3600 seconds later the execution failed because it took too long.
I want the service to start running in the background,and build success instead of running.
I tried several methods have failed.How can I achieve this .
mypurpose is to achieve hot deployment after code in gitlab repository changes.
Steps to reproduce
my .gitlab-ci.yml quite simple , as below
stages:
- test
job_deploy:
stage: test
script:
- sudo nohup java -jar /home/gitlab-runner/test.jar &
- exit
Actual behavior
tomcat started and hang-up, but the gitlab ci didn't receive an end signal then running forerver.
As you can see, I did the exit command, but the building did not end.
I tried to modify my script as below
- sudo nohup java -jar /home/gitlab-runner/test.jar 1>/home/gitlab-runner/temp 2>&1 &
- exit
Build as expected ended, but the service does not really started.

open debug model: # gitlab-ci-multi-runner --debug run
some error occurred.

Expected behavior
I want the service to start running in the background,and build success instead of running and gitlab CI build success. I don't know how to solve, can only come here for help.
Environment description
My server is CentOS release 6.8 (Final) and executor is shell.
Used GitLab Runner version
gitlab-ci-multi-runner --version
Version: 1.11.1 Git revision: a67a225c Git branch: 1-11-stable GO version: go1.7.5 Built: Fri, 03 Mar 2017 12:35:58 +0000 OS/Arch: linux/amd6