sabri128
sabri128

Reputation: 141

tcpSlaveAgentListener is invalid 404 Not Found

I have an external installation of jenkins and when I try to set up slaves for jenkins in Openshift I get this error. I follow every step from this guide https://blog.openshift.com/jenkins-slaves-in-openshift-using-an-external-jenkins-environment/

Nov 05, 2019 1:46:26 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: http://jenkins01:8080/tcpSlaveAgentListener/  is invalid: 404 Not Found
java.io.IOException: http://jenkins01:8080/tcpSlaveAgentListener/  is invalid: 404 Not Found
    at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:202)
    at hudson.remoting.Engine.innerRun(Engine.java:523)
    at hudson.remoting.Engine.run(Engine.java:474)

Upvotes: 12

Views: 20156

Answers (5)

PriyanJ
PriyanJ

Reputation: 45

Actually for me I just went to Manage Jenkins -> Security -> In Agent section, It was disabled by default. Then Setting it to random worked for me.

Upvotes: 3

Thiago Delatorre
Thiago Delatorre

Reputation: 141

In my case, I had to go to Manage Jenkins, Security, section Agents, select Random and click Save.

The issue was that the TCP port for inbound agents is disabled by default.

Upvotes: 14

Abdullah Khawer
Abdullah Khawer

Reputation: 5738

In our case, Jenkins was running on an AWS EKS Kubernetes cluster as a stateful set and we started seeing the same error after Jenkins upgrade. Deleting its pod so that it can get created and deployed again and then restarting it from the Jenkins console fixed the issue for us.

Upvotes: 0

Philip Barrett
Philip Barrett

Reputation: 51

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

Upvotes: 5

sabri128
sabri128

Reputation: 141

I finally figure it out. We had another service running on port 50000 (jenkins tunnel), I modify it to an available port and it started to work. It was misleading because in the error it shows 8080, but actually it uses 50000.

Upvotes: 1

Related Questions