Unable to run nohup command from jenkins as a background process
<p>UPDATE: Based on below discussion I have edited my answer for more accurate description.</p>

<p>I am trying to run a nohup command from jenkins. The full command is </p>

<pre><code>nohup java -jar /home/.../jar/server-process-0.35.jar prod &gt;&gt; /var/../server-process-prod.log 2&gt;&amp;1 &amp;
</code></pre>

<p>This command does not work. I can see status as success in jenkins but no java process in linux. When I do 'ps -ef | grep java'</p>

<p>However when I remove the last '&amp;' , that is I change it from run in forground instead of background</p>

<p>It starts working. I can see the java process started. </p>

<p>The original command works fine If I run it on linux console.</p>

<p>I need to run it from jenkins in the original form that is as a backgorund process. So that it is independant of jenkins. </p>

<p>Any clues why is this happening?</p>