Jenkins build failure,Gradle build daemon disappeared unexpectedly
<p>My CI Server configuration is low.</p>

<p>If I use the gradle daemon to build project,It throw a error:</p>

<pre><code>* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
</code></pre>

<p>Then, If I use the gradle-2.14.1 that default close gradle daemon,my task 'publish' is BUILD SUCCESS, but it will append other task to close daemon that BUILD FAILURE.</p>

<pre><code>The message received from the daemon indicates that the daemon has disappeared
FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
</code></pre>

<p>Of course,if I run the gradle at my macbookpro, everything is OK.</p>

<p>I found the other way to solve the problem, run <code>gradle --stop</code>, then run <code>gradle &lt;task&gt;</code>. But it just work for simple task.</p>

<p>So, how to solve this problem?</p>