| Slave pod is correctly created and agent is connected with jenkins master: Aug 09, 2018 8:49:49 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected When the job is done the plugin tries to terminate the slave: Aug 09, 2018 4:50:55 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate Terminating Kubernetes instance for agent jenkins-slave-centos-base-8ffg2 but it fails with: Aug 09, 2018 4:50:55 AM WARNING jenkins.slaves.DefaultJnlpSlaveReceiver channelClosed Computer.threadPoolForRemoting 760 for jenkins-slave-centos-base-8ffg2 terminated java.nio.channels.ClosedChannelException Agent tries to re-connect which fails: Aug 09, 2018 8:50:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated Aug 09, 2018 8:51:05 AM jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$FindEffectiveRestarters$1 onReconnect ..... INFO: [JNLP4-connect connection to jenkins2.bc.jonqe.lab.eng.bos.redhat.com/10.16.23.71:37355] Local headers refused by remote: Unknown client name: jenkins-slave-centos-base-8ffg2 Aug 09, 2018 8:51:08 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Protocol JNLP4-connect encountered an unexpected exception java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Unknown client name: jenkins-slave-centos-base-8ffg2 Result is that job is successful but the slave pod is not removed and stays there with Error status: Terminated at Aug 9, 2018 10:51:09 AM with exit code 255 (Error) Note that I'm only running the jnlp container in the pod. Full jenkins master and agent logs are attached. Note that 4 hours difference in master and agent logs are only because master logs are taken from browser so it used local timezone. |