Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-28-2012, 03:35 PM   #1
LQ Newbie
Registered: Jun 2008
Location: SF Bay area california
Distribution: Fedora 9
Posts: 13

Rep: Reputation: 0
jenkins continuous build server not starting application

Hi All,
I have a jenkins build server running that has a "slave" as well.
The slave is a centos box and the jenkins master communicates with it via ssh. No problem there. The slave builds and deploys a server (test environment) and everything looks good but after my jenkins process terminates so does my server.

After some investigation I have discovered that my server is receiving a SIGTERM. I believe this is coming when the ssh communication, between jenkins master and slave, terminates.

So what I want is to have my process continue even though the shell that starts it has terminated.

The process is being started in daemon mode (i.e. we fork the process at startup).

I believe it is just a configuration issue but I don't know what to change. Any ideas?

Old 03-30-2012, 12:53 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

How exactly are you starting Jenkins (full command please)? I have three instances of Jenkins running on the same server and each one has build slaves (over SSH) and not once has an instance 'died' like you explain.

Kind regards,

Old 03-31-2012, 02:12 PM   #3
LQ Newbie
Registered: Jun 2008
Location: SF Bay area california
Distribution: Fedora 9
Posts: 13

Original Poster
Rep: Reputation: 0
Hi Eric,
I think I may have mislead you. Jenkins the master is running and jenkins the slave is running but when the communication between the master and the slave finishes then process started by the slave receive a SIGTERM and die.

One job simply runs a bash command which looks something like

bash ./ -port <num> -daemon

where is a convenience script that sets more arguments, kills the existing server, renames the log file and finally (re)starts my new server.

I have added to my bash command things like
pidof $ServerName

Which shows that my server that I started is still alive but dies when the jenkins script stops running.
I can increase (or decrease) the time to sleep and that determines how long my server process will live.

The problem, I believe, is that the parent pid, the communication shell, is being killed which in turns kills all the children pid(s). I think it is just a configuration value but I don't know which one.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger jenkins build with URL trigger when using git? jonizen Linux - Server 1 10-14-2011 01:07 PM
LXer: Continuous Deployment With Jenkins And Rex LXer Syndicated Linux News 0 09-21-2011 06:50 AM
Coding Dilemma: Build application with PHP framework or build all myself? socceroos Programming 2 05-10-2009 06:04 PM
C server program to be used for continuous monitoring of some status. NancyT Programming 2 04-17-2009 09:23 AM
Is your Sun Java System application server starting up? crisostomo_enrico Solaris / OpenSolaris 3 09-29-2007 06:27 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration