Kubernetes plugin - EOF error when splitting containers

11/18/2021

I am using the kubernetes plugin for Jenkins to managae pods. Recently, we had one container defined "jnlp" with a custom image, where the entire pipeline was executed in. This was done a while back, and had to do with the issue described here (https://issues.jenkins.io/browse/JENKINS-58065). We've upgraded since to Kubernetes-plugin version 1.30, and would like to seperate the jnlp into a dedicated jnlp, and a "build" container to do all the logic, to make future maintenance on the jnlp less impactful.

The issue we are seeing, is that the same issue is still happening. We run sh scripts to make connection to services such as Bitbucket, and randomly these sh commands will immediately return an error like:

java.io.EOFException

at okio.RealBufferedSource.require(RealBufferedSource.java:61) at okio.RealBufferedSource.readByte(RealBufferedSource.java:74) at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:117) at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101) at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274) at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 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)

There does not seem to be any rhyme or reason to why it's happening. The only way to fix this seems to be wrapping every service call that attempts retries, but I'm not sure why this is even happening in the first place. We didn't have such unstable connection before.

-- user3334871
java
jenkins
kubernetes

0 Answers