copy the command from README and run it on my laptop
docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts
it runs fine, I can login, and also confirm I have enabled the jnlp port
So I can make sure the port 50000 is actived
$ curl localhost:50000
Jenkins-Agent-Protocols: JNLP4-connect, Ping
Jenkins-Version: 2.150.1
Jenkins-Session: a693c836
Client: 172.17.0.1
Server: 172.17.0.2
Remoting-Minimum-Version: 3.4
but when connect with jnlp slave (container is jenkins/jnlp-slave), I got exact same error described in https://issues.jenkins-ci.org/browse/JENKINS-28499
tcpSlaveAgentListener not found
the test:
$ curl localhost:50000/tcpSlaveAgentListener/
Not Found
register slaves to jenkins master
Seems there are some issues reported with https://issues.jenkins-ci.org/browse/JENKINS-28499 for same issue
docker version$ docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true
you are hitting the wrong port, try
localhost:8080/tcpSlaveAgentListener/
Thanks, @carlossg
I do get response from localhost:8080/tcpSlaveAgentListener/
That confused me. what the port 50000 (jnlp) used for? My understanding is, port 50000 is used for slaves to connect to master, isn't it?
@ozbillwang https://stackoverflow.com/questions/58719522/tcpslaveagentlistener-is-invalid-404-not-found/59616476#59616476 check out my comment here
Anyone looking for the real explanation for this... You must configure a different port for jnlp i.e. 50000. The catch is that you need to provide the JENKINS_URL=http://jenkins:8080 and JENKINS_TUNNEL=jenkins:50000. If you try to hit 50000 on both the URL and TUNNEL you will get the error of 50000/tcpSlaveAgentListener invalid 404 not found. If you try to hit 8080 on both URL AND TUNNEL you will get an error like "Incorrect acknowledgement sequence, expected 0x000341434b got 0x485454502f". I hope this saves someone time
{
"name": "JENKINS_URL",
"value": "http://<jenkins>:8080"
},
{
"name": "JENKINS_TUNNEL",
"value": "<jenkins>:50000"
},
Most helpful comment
@ozbillwang https://stackoverflow.com/questions/58719522/tcpslaveagentlistener-is-invalid-404-not-found/59616476#59616476 check out my comment here
{ "name": "JENKINS_URL", "value": "http://<jenkins>:8080" }, { "name": "JENKINS_TUNNEL", "value": "<jenkins>:50000" },