Jenkins is using mechanism to detect spawned processes and kill them after finishing job, so if you will just start such ad-hoc background daemon process, Jenkins will kill it with warning:
Fortunately, there is easy hack to tell Jenkins ignore such process, just create fake BUILD_ID and start your application, for example, this can be entered into Execute shell build step:
Warning is still there, but process should be fine and running. There is more about it here.
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
Fortunately, there is easy hack to tell Jenkins ignore such process, just create fake BUILD_ID and start your application, for example, this can be entered into Execute shell build step:
BUILD_ID=dontKillMe nohup java -jar test.jar &
Warning is still there, but process should be fine and running. There is more about it here.
Thanks. Quick and easy fix.
ReplyDeleteThanks a lot! I spent 1 day for this problem.
ReplyDeleteThanks, it saved my day
ReplyDeleteWhere i need to give this command, at Jenkins server or client...
ReplyDeletei spent almost one day so far but still no luck.. please give quick answer...
give in batch file ex: set BUILD_ID=dontKillMe nohup java -jar test.jar &
ReplyDeleteits worked...
Thanks, it also saved my day :)
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteif you put nohup java -jar test.jar & in another shell script, call start_up.sh, and execute shell in jenkins: BUILD_ID=dontKillMe nohup start_up.sh &. It DON NOT work! I don't know why and wonder how to fix it..
ReplyDeletefor anyone else, I had to put the dontkillme line ABOVE the background task in windows ie :
ReplyDeleteset BUILD_ID=dontKillMe
@start /b cmd /c bundle exec thin start
this problem has wasted me nearly an entire day today :(
Administrations, for example, background checks are more open. Through this article, I am will confer to you the best background check organization accessible on the net.best background investigation services
ReplyDeleteExcellent and very exciting site. Love to watch. Keep Rocking. dungeons and dragons dice
ReplyDeleteExcellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. dnd dice
ReplyDeleteWow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. toro scarpe nere
ReplyDeleteTherefore, the service provider will charge you based on the type of fault in your device or machine. Therefore, you may want to ask the pro about how they figure out the service charges Santa Clarita Sub Zero Refrigerator Repair Service
ReplyDeleteThis is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Javascript Commission Bot Review
ReplyDeleteThey should then give reasons why your selection is or is not the right selection for your needs and offer alternatives which they feel could be better for the job. seal coat
ReplyDeleteThanks Alot I spent
ReplyDeleteThanks i literally spent 1 half day to get this done
ReplyDelete