I running jenkins master outside or k8s cluster,
After running the job, I can the pod is created and running, then turned 
into terminated very soon,
Looks ing slave created in k8s cluster can't connect to jenkins master.

from JNLP container log I can see

Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to 
alter the behavior
Warning: SECRET is defined twice in command-line arguments and the 
environment variable
Warning: AGENT_NAME is defined twice in command-line arguments and the 
environment variable
Feb 13, 2018 7:02:03 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: jenkins-slave-n58w4-bdvl7
Feb 13, 2018 7:02:03 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Feb 13, 2018 7:02:03 AM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: 
/home/jenkins/.jenkins/cache/jars
Feb 13, 2018 7:02:03 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://MY_JENKINS_IP/]
Feb 13, 2018 7:02:04 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Failed to connect to https://MY_JENKINS_IP/tcpSlaveAgentListener/: 
java.security.cert.CertificateException: No subject alternative names 
matching IP address MY_JENKINS_IP found
java.io.IOException: Failed to connect to 
https://MY_JENKINS_IP/tcpSlaveAgentListener/: 
java.security.cert.CertificateException: No subject alternative names 
matching IP address MY_JENKINS_IP found
at 
org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:199)
at hudson.remoting.Engine.innerRun(Engine.java:518)
at hudson.remoting.Engine.run(Engine.java:469)
Caused by: javax.net.ssl.SSLHandshakeException: 
java.security.cert.CertificateException: No subject alternative names 
matching IP address MY_JENKINS_IP found
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at 
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514)
at 
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)

On Friday, February 9, 2018 at 4:23:48 PM UTC+8, Nick Li wrote:
>
> jenkins-slave is offline (suspend) from jenkins webpage.
>
> My environment:
> I have jenkins running on a debian server, created a k8s cluster in gcp. 
> installed kubernetes-plugin, configed k8s in jenkins cloud section,(using 
> admin/k8s password.),
>
> Then created a test pipeline job using the following script
> ```
> podTemplate(label: 'pod-golang', 
>     containers: [
>         containerTemplate(
>             name: 'golang',
>             image: 'golang',
>             ttyEnabled: true,
>             command: 'cat'
>         )
>     ]
> ) {
>     node ('pod-golang') {
>
>         stage 'Switch to Utility Container'
>         container('golang') {
>
>           sh ("go version")
>
>         }
>     }
> }
> ```
> from `kubectl get pods` I can see the pod is created, but on jenkins 
> webpage, jenkins-slave is alwasy showing offline
> Any ideas
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b8f1c759-26d7-4793-b873-33e573894421%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to