Re: How to keep Unix process alive after job is completed?

2013-07-04 Thread John Vacz

Looks very promising. I will give it a try.
Thank you, Tim.

-jv

Am 03.07.2013 17:45, schrieb Tim Ford:

John, your issue might be unrelated to Jenkins.

See:  
http://stackoverflow.com/questions/285015/linux-prevent-a-background-process-from-being-stopped-after-closing-ssh-client



On Wednesday, July 3, 2013 5:42:10 AM UTC-5, John Vacz wrote:

We have a job executing a shell script (on a slave) to restart one
dev appserver on a remote server if it does not work properly
(dont bother why its not working):

  # BUILD_ID=dontKillMe
  ssh us...@some.remote.server  exec
/path/to/appserver/force_restart_script arg1

The "force_restart_script" on the *remote* server doing the following:

  # find and kill the old appserver process
  kill_appserver_script arg1
  # start appserver with specified argument
  /path/to/appserver/start_appserver_script arg1

At the end, the old appserver process was killed, and the new
appserver process was also terminated. How can i keep this from
happening? The BUILD_ID=dontKillMe in job configureation doesn't
seem to work (that would only keep the ssh from being terminated
on the slave, right?), or I should actually set the BUILD_ID in
the remote ssh shell?

Any help is very much appreciated!

-jv

Am 26.04.2013 10:16, schrieb Riccardo Foschia:

Hi,

Take a look at
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller

section "If your build wants to leave a daemon running behind..."

Greetings,
Riccardo

Am 26.04.2013 10:08, schrieb hezjing:

Hi

I have a job which will be run in an Linux slave.

This job will execute a shell command to start a server process
which will
run forever. Unfortunately this process is terminated when the
job is
finished.

When I tested this using PuTTY, the server process is still
alive after I
logged-in and out several times.

May I know how to keep a Unix process alive after the job is
completed?








--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-07-03 Thread Richard Bywater
Could you just have the server process setup as a service and then "start"
the service?

Richard.

On Fri, Apr 26, 2013 at 8:08 PM, hezjing  wrote:

> Hi
>
> I have a job which will be run in an Linux slave.
>
> This job will execute a shell command to start a server process which will
> run forever. Unfortunately this process is terminated when the job is
> finished.
>
> When I tested this using PuTTY, the server process is still alive after I
> logged-in and out several times.
>
> May I know how to keep a Unix process alive after the job is completed?
>
>
> --
>
> Hez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-07-03 Thread Tim Ford
John, your issue might be unrelated to Jenkins.

See:  
http://stackoverflow.com/questions/285015/linux-prevent-a-background-process-from-being-stopped-after-closing-ssh-client


On Wednesday, July 3, 2013 5:42:10 AM UTC-5, John Vacz wrote:
>
>  We have a job executing a shell script (on a slave) to restart one dev 
> appserver on a remote server if it does not work properly (dont bother why 
> its not working):
>
>   # BUILD_ID=dontKillMe
>   ssh us...@some.remote.server  exec 
> /path/to/appserver/force_restart_script arg1
>
> The "force_restart_script" on the *remote* server doing the following:
>
>   # find and kill the old appserver process
>   kill_appserver_script arg1
>   # start appserver with specified argument
>   /path/to/appserver/start_appserver_script arg1
>
> At the end, the old appserver process was killed, and the new appserver 
> process was also terminated. How can i keep this from happening? The 
> BUILD_ID=dontKillMe in job configureation doesn't seem to work (that would 
> only keep the ssh from being terminated on the slave, right?), or I should 
> actually set the BUILD_ID in the remote ssh shell?
>
> Any help is very much appreciated!
>
> -jv
>
> Am 26.04.2013 10:16, schrieb Riccardo Foschia: 
>
> Hi, 
>
> Take a look at 
> https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller section "If 
> your build wants to leave a daemon running behind..." 
>
> Greetings, 
> Riccardo 
>
> Am 26.04.2013 10:08, schrieb hezjing: 
>
> Hi 
>
> I have a job which will be run in an Linux slave. 
>
> This job will execute a shell command to start a server process which will 
> run forever. Unfortunately this process is terminated when the job is 
> finished. 
>
> When I tested this using PuTTY, the server process is still alive after I 
> logged-in and out several times. 
>
> May I know how to keep a Unix process alive after the job is completed? 
>
>
>  
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-07-03 Thread John Vacz
We have a job executing a shell script (on a slave) to restart one dev 
appserver on a remote server if it does not work properly (dont bother 
why its not working):


  # BUILD_ID=dontKillMe
  ssh user@some.remote.server exec 
/path/to/appserver/force_restart_script arg1


The "force_restart_script" on the *remote* server doing the following:

  # find and kill the old appserver process
  kill_appserver_script arg1
  # start appserver with specified argument
  /path/to/appserver/start_appserver_script arg1

At the end, the old appserver process was killed, and the new appserver 
process was also terminated. How can i keep this from happening? The 
BUILD_ID=dontKillMe in job configureation doesn't seem to work (that 
would only keep the ssh from being terminated on the slave, right?), or 
I should actually set the BUILD_ID in the remote ssh shell?


Any help is very much appreciated!

-jv

Am 26.04.2013 10:16, schrieb Riccardo Foschia:

Hi,

Take a look at 
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller section 
"If your build wants to leave a daemon running behind..."


Greetings,
Riccardo

Am 26.04.2013 10:08, schrieb hezjing:

Hi

I have a job which will be run in an Linux slave.

This job will execute a shell command to start a server process which 
will

run forever. Unfortunately this process is terminated when the job is
finished.

When I tested this using PuTTY, the server process is still alive 
after I

logged-in and out several times.

May I know how to keep a Unix process alive after the job is completed?






--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-04-28 Thread hezjing
Yes, Rakesh


On Mon, Apr 29, 2013 at 2:21 PM, hezjing  wrote:

> Hi Rakesh
>
>
> On Mon, Apr 29, 2013 at 2:16 PM, rakesh menon wrote:
>
>> Hi hezjing,
>>
>> I have a same issue . Was adding the above parameter the only thing you
>> did or do we do any other additional steps?
>>
>> Thanks
>>
>>
>> On Mon, Apr 29, 2013 at 7:35 AM, hezjing  wrote:
>>
>>> Thanks, it works by create a job parameter BUILD_ID=dontKillMe
>>>
>>>
>>> On Fri, Apr 26, 2013 at 4:16 PM, Riccardo Foschia <
>>> riccardo.fosc...@meta-level.de> wrote:
>>>
 Hi,

 Take a look at https://wiki.jenkins-ci.org/**display/JENKINS/**
 ProcessTreeKillersection
  "If your build wants to leave a daemon running behind..."

 Greetings,
 Riccardo

 Am 26.04.2013 10:08, schrieb hezjing:

  Hi
>
> I have a job which will be run in an Linux slave.
>
> This job will execute a shell command to start a server process which
> will
> run forever. Unfortunately this process is terminated when the job is
> finished.
>
> When I tested this using PuTTY, the server process is still alive
> after I
> logged-in and out several times.
>
> May I know how to keep a Unix process alive after the job is completed?
>
>
>
 --

 META-LEVEL Software AG
 Saarbrücker Str. 51
 66130 Saarbrücken
 Deutschland
 Tel: +49 - 681 / 99687-0
 Fax: +49 - 681 / 99687-99
 Mail: i...@meta-level.de
 Web: www.meta-level.de

 Rechtsform: Aktiengesellschaft
 Sitz: Saarbrücken
 HR B Nr. 13 380 Amtsgericht Saarbrücken
 USt-IdNr. DE 1 38 17
 Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
 Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

 --
 You received this message because you are subscribed to the Google
 Groups "Jenkins Users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to 
 jenkinsci-users+unsubscribe@**googlegroups.com
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>
>>>
>>> --
>>>
>>> Hez
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
>
> Hez
>



-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-04-28 Thread hezjing
Hi Rakesh


On Mon, Apr 29, 2013 at 2:16 PM, rakesh menon  wrote:

> Hi hezjing,
>
> I have a same issue . Was adding the above parameter the only thing you
> did or do we do any other additional steps?
>
> Thanks
>
>
> On Mon, Apr 29, 2013 at 7:35 AM, hezjing  wrote:
>
>> Thanks, it works by create a job parameter BUILD_ID=dontKillMe
>>
>>
>> On Fri, Apr 26, 2013 at 4:16 PM, Riccardo Foschia <
>> riccardo.fosc...@meta-level.de> wrote:
>>
>>> Hi,
>>>
>>> Take a look at https://wiki.jenkins-ci.org/**display/JENKINS/**
>>> ProcessTreeKillersection
>>>  "If your build wants to leave a daemon running behind..."
>>>
>>> Greetings,
>>> Riccardo
>>>
>>> Am 26.04.2013 10:08, schrieb hezjing:
>>>
>>>  Hi

 I have a job which will be run in an Linux slave.

 This job will execute a shell command to start a server process which
 will
 run forever. Unfortunately this process is terminated when the job is
 finished.

 When I tested this using PuTTY, the server process is still alive after
 I
 logged-in and out several times.

 May I know how to keep a Unix process alive after the job is completed?



>>> --
>>>
>>> META-LEVEL Software AG
>>> Saarbrücker Str. 51
>>> 66130 Saarbrücken
>>> Deutschland
>>> Tel: +49 - 681 / 99687-0
>>> Fax: +49 - 681 / 99687-99
>>> Mail: i...@meta-level.de
>>> Web: www.meta-level.de
>>>
>>> Rechtsform: Aktiengesellschaft
>>> Sitz: Saarbrücken
>>> HR B Nr. 13 380 Amtsgericht Saarbrücken
>>> USt-IdNr. DE 1 38 17
>>> Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
>>> Vorsitzender des Aufsichtsrats:  Reinhard Kuhn
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to 
>>> jenkinsci-users+unsubscribe@**googlegroups.com
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>
>> --
>>
>> Hez
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-04-28 Thread rakesh menon
Hi hezjing,

I have a same issue . Was adding the above parameter the only thing you did
or do we do any other additional steps?

Thanks


On Mon, Apr 29, 2013 at 7:35 AM, hezjing  wrote:

> Thanks, it works by create a job parameter BUILD_ID=dontKillMe
>
>
> On Fri, Apr 26, 2013 at 4:16 PM, Riccardo Foschia <
> riccardo.fosc...@meta-level.de> wrote:
>
>> Hi,
>>
>> Take a look at https://wiki.jenkins-ci.org/**display/JENKINS/**
>> ProcessTreeKillersection
>>  "If your build wants to leave a daemon running behind..."
>>
>> Greetings,
>> Riccardo
>>
>> Am 26.04.2013 10:08, schrieb hezjing:
>>
>>  Hi
>>>
>>> I have a job which will be run in an Linux slave.
>>>
>>> This job will execute a shell command to start a server process which
>>> will
>>> run forever. Unfortunately this process is terminated when the job is
>>> finished.
>>>
>>> When I tested this using PuTTY, the server process is still alive after I
>>> logged-in and out several times.
>>>
>>> May I know how to keep a Unix process alive after the job is completed?
>>>
>>>
>>>
>> --
>>
>> META-LEVEL Software AG
>> Saarbrücker Str. 51
>> 66130 Saarbrücken
>> Deutschland
>> Tel: +49 - 681 / 99687-0
>> Fax: +49 - 681 / 99687-99
>> Mail: i...@meta-level.de
>> Web: www.meta-level.de
>>
>> Rechtsform: Aktiengesellschaft
>> Sitz: Saarbrücken
>> HR B Nr. 13 380 Amtsgericht Saarbrücken
>> USt-IdNr. DE 1 38 17
>> Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
>> Vorsitzender des Aufsichtsrats:  Reinhard Kuhn
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 
>> jenkinsci-users+unsubscribe@**googlegroups.com
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out
>> .
>>
>>
>>
>
>
> --
>
> Hez
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-04-28 Thread hezjing
Thanks, it works by create a job parameter BUILD_ID=dontKillMe


On Fri, Apr 26, 2013 at 4:16 PM, Riccardo Foschia <
riccardo.fosc...@meta-level.de> wrote:

> Hi,
>
> Take a look at https://wiki.jenkins-ci.org/**display/JENKINS/**
> ProcessTreeKillersection
>  "If your build wants to leave a daemon running behind..."
>
> Greetings,
> Riccardo
>
> Am 26.04.2013 10:08, schrieb hezjing:
>
>  Hi
>>
>> I have a job which will be run in an Linux slave.
>>
>> This job will execute a shell command to start a server process which will
>> run forever. Unfortunately this process is terminated when the job is
>> finished.
>>
>> When I tested this using PuTTY, the server process is still alive after I
>> logged-in and out several times.
>>
>> May I know how to keep a Unix process alive after the job is completed?
>>
>>
>>
> --
>
> META-LEVEL Software AG
> Saarbrücker Str. 51
> 66130 Saarbrücken
> Deutschland
> Tel: +49 - 681 / 99687-0
> Fax: +49 - 681 / 99687-99
> Mail: i...@meta-level.de
> Web: www.meta-level.de
>
> Rechtsform: Aktiengesellschaft
> Sitz: Saarbrücken
> HR B Nr. 13 380 Amtsgericht Saarbrücken
> USt-IdNr. DE 1 38 17
> Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
> Vorsitzender des Aufsichtsrats:  Reinhard Kuhn
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> jenkinsci-users+unsubscribe@**googlegroups.com
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>


-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to keep Unix process alive after job is completed?

2013-04-26 Thread Riccardo Foschia

Hi,

Take a look at 
https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller section 
"If your build wants to leave a daemon running behind..."


Greetings,
Riccardo

Am 26.04.2013 10:08, schrieb hezjing:

Hi

I have a job which will be run in an Linux slave.

This job will execute a shell command to start a server process which will
run forever. Unfortunately this process is terminated when the job is
finished.

When I tested this using PuTTY, the server process is still alive after I
logged-in and out several times.

May I know how to keep a Unix process alive after the job is completed?




--

META-LEVEL Software AG
Saarbrücker Str. 51
66130 Saarbrücken
Deutschland
Tel: +49 - 681 / 99687-0
Fax: +49 - 681 / 99687-99
Mail: i...@meta-level.de
Web: www.meta-level.de

Rechtsform: Aktiengesellschaft
Sitz: Saarbrücken
HR B Nr. 13 380 Amtsgericht Saarbrücken
USt-IdNr. DE 1 38 17
Vorstände: Dipl.-Inform. Peter Badt und Dipl.-Inform. Peter Raber
Vorsitzender des Aufsichtsrats:  Reinhard Kuhn

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.