I am trying to run kaniko container by provisioning jenkins slaves through jenkins pipeline, but having connectivity issue and following errors

7/11/2019

My jenkins is running on kubernetes(on private cloud) as a pod and I am trying to build a image using kaniko by provisioning jenkins slave. But I am keep on getting the error saying that the connection is refused.

I have configured the kubernetes plugin on jenkins by providing the details about the kubernetes cluster and link of the jenkins master pod. I also have configured the service account for jenkins with required permissions.

kubectl logs -f pods/kaniko-8bzq8-gbtgp jnlp



Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
Jul 10, 2019 11:01:42 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: kaniko-8bzq8-gbtgp
Jul 10, 2019 11:01:42 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jul 10, 2019 11:01:43 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3.29
Jul 10, 2019 11:01:43 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: /home/jenkins/.jenkins/cache/jars
Jul 10, 2019 11:01:43 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://jenkins:8080/]
Jul 10, 2019 11:01:43 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Failed to connect to https://jenkins:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
java.io.IOException: Failed to connect to https://jenkins:8080/tcpSlaveAgentListener/: Connection refused (Connection refused)
........
.....

The expected result is that after running the build in jenkins, it should provision kaniko agent and build the docker image.

-- Prabhjot Kaur
jenkins
jenkins-pipeline
jnlp
kubernetes

0 Answers