title: Jenkins: Agent went offline during the build
body: <p>Currently I am running tests with Jenkins on multiple virtual machines (VM), with both Linux( openSuse 64-bit) and Windows 7 (x64).
  My VMs are located on a server running on Linux.
  My version of Jenkins is 2.2
  Strangely, sometimes my agent goes offline without any reason. And by doing so, my build fails.</p>
  
  <p>From what I previously read on the internet, some people caim to be a problem with the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Timestamper" rel="nofollow noreferrer">Timestamper</a> plugin. Well, I do not have it installed.</p>
  
  <p>What is even more strange, on Windows I get this error more often than on Linux. So far I've disabled 'Hibernate' and 'Sleep' in Windows, but that was not the cure to my problem.And in most of the cases it goes offline after ~1:30 hours of running.</p>
  
  <p><strong>Configuration of my slave</strong></p>
  
  <ol>
  <li><em>Virtual machine Type</em>      - headless</li>
  <li><em>Virtual machine stop mode</em> - powerdown</li>
  <li><em>Secondary launch method</em>   - Launch agent via Java Web Start</li>
  <li><em>Availability</em>              - Keep this agent online as much as possible</li>
  </ol>
  
  <p>Also, in Windows I've created a .bat file in Startup folder that connects to my agent every time Windows boots up. </p>
  
  <p>Any idea why it is happening this or how to solve it?</p>
  
  <pre><code>Agent went offline during the build
  ERROR: Connection was broken: java.io.EOFException
      at org.jenkinsci.remoting.nio.NioChannelHub$3.run(NioChannelHub.java:614)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>EDIT (25.08.2016): 4/50 build succeded, but all the rest failed.</p>
  
  <p>EDIT : All what I got so far  <a href="https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-36944" rel="nofollow noreferrer">https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-36944</a></p>