-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.289.2
Kubernetes plugin 1.30.11
Openshift 3.11 and Openshift 4.6
Sometimes, randomly, when we try to run a job with a pod template with two containers (jnlp container and an additional one), Jenkins starts running the pipeline before the pod is ready. The result is that when the pipeline reaches the container step it fails.
18:14:20 [Pipeline] container
18:14:20 [Pipeline] {
18:14:20 [Pipeline] sh
18:14:20 java.net.ProtocolException: Expected HTTP 101 response but was '500 Internal Server Error'
18:14:20 at okhttp3.internal.ws.RealWebSocket.checkResponse(RealWebSocket.java:229)
18:14:20 at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:196)
18:14:20 at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
18:14:20 at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
18:14:20 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
18:14:20 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
18:14:20 at java.base/java.lang.Thread.run(Thread.java:834)
This issue happens when the second container uses a big image (around 1Gb). The jnlp container starts but the second container is not started yet, but nevertheless Jenkins starts running the pipeline.
Did you use `container(CONTAINER_NAME)` with the correct CONTAINER_NAME? or is a default container specified in your podTemplate?