<p>When I am building my project in Jenkins 2.235.3 in kubernetes v1.18, it throws this error:</p>
<pre class="lang-sh prettyprint-override"><code> &gt; git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 &gt; git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 43ae2828ca05ec071a50e42edd2a842b7ff9cc52 (refs/remotes/origin/master)
 &gt; git config core.sparsecheckout # timeout=10
 &gt; git checkout -f 43ae2828ca05ec071a50e42edd2a842b7ff9cc52 # timeout=10
Commit message: &quot;[feature] delete unused article&quot;
 &gt; git rev-list --no-walk 43ae2828ca05ec071a50e42edd2a842b7ff9cc52 # timeout=10
Unpacking https://nodejs.org/dist/v14.7.0/node-v14.7.0-linux-x64.tar.gz to /home/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS-14.7.0 on default-dvn8k
Agent went offline during the build
ERROR: Connection was broken: java.nio.channels.ClosedChannelException
    at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
    at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
    at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:795)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Build step 'Execute NodeJS script' marked build as failure
Finished: FAILURE
</code></pre>
<p>I am trying to download the node package using this command in the Jenkins' pod:</p>
<pre class="lang-sh prettyprint-override"><code>wget -c https://nodejs.org/dist/v14.7.0/node-v14.7.0-linux-x64.tar.gz
</code></pre>
<p>It works fine. So what is the problem of my project? How to make it work?</p>

Dolphin
<p>It looks like your Jenkins is slave (Kubernetes pod) is going offline during the build (❓).</p>
<p>Get the slave pod:</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl get pods --all-namespaces | grep slave
</code></pre>
<p>Then check the logs:</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl -n &lt;namespace&gt; logs &lt;pod-name&gt;
</code></pre>
<p>Describe the pod to see the events.</p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl -n &lt;namespace&gt; describe pod &lt;pod-name&gt;
</code></pre>
<p>Network issue❓ 👉 <code>Connection was broken: java.nio.channels.ClosedChannelException</code></p>
<p>Check that none of your pods are in <code>CrashBackoffLoop</code></p>
<pre class="lang-sh prettyprint-override"><code>$ kubectl get pods --all-namespaces | grep Crash
</code></pre>
<p>✌️</p>
