I'm trying to create agent on docker by using the below command but it returned exception
:~$ docker run jenkins/jnlp-slave -disableHttpsCertValidation -url https://hostName/CI-KINDLE-1924 774351357f93a1026afasdfagsg180551cca56a9cfa741234531fsdfdee8feeb dockerslave
Exception:
Observed the below exception in console:
INFO: Protocol JNLP4-connect encountered an unexpected exception java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Unknown client name: dockerslave 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: dockerslave 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)
When I tried to connect through "Web Launch agent from browser" using below command It connected successfully.
java -jar agent.jar -jnlpUrl https://hostName/CI-KINDLE-1924/computer/Worker/slave-agent.jnlp -secret 774351357f93a1026afasdfagsg180551cca56a9cfa741234531fsdfdee8feeb -workDir "/x/home/achu"
The above command works as expected and the agent will be active. But I just want to create slave nodes in docker and wanna activate them at runtime and destroy.
Please anyone help me to achieve this
I just added my slave node name as client name and it worked.
I just created a slave node in Jenkins master and I just used the name It works perfectly fine.