-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins: 2.176.1
org.csanchez.jenkins.plugins:kubernetes:1.18.1
I'm receiving the following error when I dynamically deploy Jenkins slave pods to my Kubernetes cluster. I've tried jenkins.slaves.DefaultJnlpSlaveReceiver.disableStrictVerification=true to no effect
I see the pods being created in Kubernetes, they just seem to fail to register to the master for some reason.
With agent protocol 4 enabled on the master:
INFO: [JNLP4-connect connection to linux-jenkins-discovery.linux-jenkins.svc.cluster.local/10.43.209.92:50000] Local headers refused by remote: Unknown client name: jenkinsslav-rh6nj
Aug 12, 2019 3:36:36 PM 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: jenkinsslav-rh6nj
at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223)
at hudson.remoting.Engine.innerRun(Engine.java:614)
at hudson.remoting.Engine.run(Engine.java:474)
Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Unknown client name: jenkinsslav-rh6nj
at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.newAbortCause(ConnectionHeadersFilterLayer.java:378)
at org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer.onRecvClosed(ConnectionHeadersFilterLayer.java:433)
at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172)
at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1500(BIONetworkLayer.java:48)
at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:247)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.nio.channels.ClosedChannelException
... 7 more
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to linux-jenkins-discovery.linux-jenkins.svc.cluster.local:50000
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP4-plaintext not supported, skipping
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP3-connect is not enabled, skipping
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP2-connect not supported, skipping
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP-connect not supported, skipping
Aug 12, 2019 3:36:36 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: The server rejected the connection: None of the protocols were accepted
java.lang.Exception: The server rejected the connection: None of the protocols were accepted
at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
at hudson.remoting.Engine.innerRun(Engine.java:639)
at hudson.remoting.Engine.run(Engine.java:474)
With only protocol 1 enabled:
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
java -Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=true -cp /usr/share/jenkins/slave.jar hudson.remoting.jnlp.Main -headless -tunnel linux-jenkins-discovery.linux-jenkins.svc.cluster.local:50000 -url https://linuxjnks.rancher.somewhere.com/ -workDir /home/jenkins/ e7a8c4b7cb92f3058003fa78d23f5ce12f8f975849f20cccaf0075499d927148 jenkinsslav-rpcnc
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: jenkinsslav-rpcnc
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Aug 12, 2019 1:54:31 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3.29
Aug 12, 2019 1:54:31 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/jenkins/remoting as a remoting work directory
Both error and output logs will be printed to /home/jenkins/remoting
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among https://linuxjnks.rancher.somewhere.com/
Aug 12, 2019 1:54:31 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP-connect, Ping]
Aug 12, 2019 1:54:31 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: linux-jenkins-discovery.linux-jenkins.svc.cluster.local
Agent port: 50000
Identity: a8:7f:31:f3:34:10:14:cd:42:f2:21:24:82:47:d7:9c
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to linux-jenkins-discovery.linux-jenkins.svc.cluster.local:50000
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP4-connect not supported, skipping
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP4-plaintext not supported, skipping
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP3-connect is not enabled, skipping
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Server reports protocol JNLP2-connect not supported, skipping
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP-connect
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP-connect encountered an unexpected exception
java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at hudson.remoting.Engine.innerRun(Engine.java:614)
at hudson.remoting.Engine.run(Engine.java:474)
Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Server didn't accept the handshake:
at org.jenkinsci.remoting.engine.JnlpProtocol1Handler.sendHandshake(JnlpProtocol1Handler.java:123)
at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:162)
at org.jenkinsci.remoting.engine.LegacyJnlpProtocolHandler$2.call(LegacyJnlpProtocolHandler.java:158)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Thread.java:748)
Aug 12, 2019 1:54:31 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: The server rejected the connection: None of the protocols were accepted
java.lang.Exception: The server rejected the connection: None of the protocols were accepted
at hudson.remoting.Engine.onConnectionRejected(Engine.java:682)
at hudson.remoting.Engine.innerRun(Engine.java:639)
at hudson.remoting.Engine.run(Engine.java:474)