[Workaround] Let's solve the Jenkins slave connection issue with the Jenkins Kubernetes plugin
2 min readJan 3, 2022
To start the new year 2022 tasks, Today I upgraded my Jenkins cluster. But It didn’t go well. 😧
After the Jenkins and Plugin upgrade, I was getting the following error on my pipeline executions.
To give more context, We are using Kubernetes Jenkins plugins to dynamically create Jenkins agents for each build. So our Jenkins slaves are more dynamic and getting created on-demand on a Kubernetes cluster.
Error when executing unsuccessful post condition:
java.io.IOException: Timed out waiting for websocket connection. You should increase the value of system property org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator.websocketConnectionTimeout currently set at 30 seconds
at org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator$1.doLaunch(ContainerExecDecorator.java:457)
at org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator$1.launch(ContainerExecDecorator.java:344)
at hudson.Launcher$ProcStarter.start(Launcher.java:507)
at org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:176)
at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:132)
at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:324)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:319)
at…