Can't connect slave agent to master using remoting-3.21.jar


I'm to connect my kubernetes slave pod to my master using this command line in the slave jnlp container:

java -cp C:\slave.jar hudson.remoting.jnlp.Main -headless -tunnel jenkins-agent:50000 -url http://jenkins.jx.  -workDir C:\jenkins\agents

how ever I recieve this error:

Jun 26, 2018 6:39:03 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Failed to connect to http://jenkins.jx. jenkins.jx.
java.io.IOException: Failed to connect to http://jenkins.jx. jenkins.jx.
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:194)
at hudson.remoting.Engine.innerRun(Engine.java:518)
at hudson.remoting.Engine.run(Engine.java:469)
Caused by: java.net.UnknownHostException: jenkins.jx.
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:191)
... 2 more

I tried disabling protocol 3 in the jenkins ui, but when I ran this new command:

java -Dorg.jenkinsci.remoting.engine.JnlpProtocol3.disabled=true -cp C:\slave.jar hudson.remoting.jnlp.Main -headless -tunnel jenkins-agent:50000 -url http://jenkins.jx. -workDir C:\jenkins\agents

I get the error:

Error: Could not find or load main class .jenkinsci.remoting.engine.JnlpProtocol3.disabled=true


  • 1
    Alex Taylor

    Hey Ovven,


    The error `UnknownHostException: jenkins.jx.` means that your agent can not connect to the master URL/hostname due to routing issues rather than a JNLP protocol issue. It should be the same error if you were to ping from the agent back to the master. To resolve this you would need to ensure that your Agent can translate that hostname to a given IP address by doing something like adding it to your /etc/hosts file.


    This seems like something that would make for a good support ticket. Do you already have an account with our Support team?



  • 0
    Ovven Day

    Hello Alex,


    Thanks for informative response!

    I don't think I have an account with your support team, how would I create an account or support ticket?


    O Day

  • 1
    Alex Taylor

    Hey O Day,


    No worries you would have to have a CloudBees account for access to the support channel. I just wanted to make sure if there was a better way to handle this request.


    Let me know if I can clarify anything in my response because I think that should get you going correctly.

Please sign in to leave a comment.