jenkins kubernetes jenkins slave node is offline
Asked Answered
P

1

5

root@k8s:/opt/k8s/kubernetes/cluster/ubuntu/binaries# ./kubectl logs jnlp-slave-1c45182a61

Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up slave: jnlp-slave-1c45182a61
Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://jenkins_server_ip:8080]
Aug 16, 2016 6:56:38 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: http://jenkins_server_ip:8080/tcpSlaveAgentListener/ is invalid: 404 Not Found
java.lang.Exception: http://jenkins_server_ip:8080/tcpSlaveAgentListener/ is invalid: 404 Not Found
        at hudson.remoting.Engine.run(Engine.java:215)

root@k8s:/opt/k8s/kubernetes/cluster/ubuntu/binaries# curl http://jenkins_server_ip:8080/tcpSlaveAgentListener/

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /tcpSlaveAgentListener/. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>
Punkie answered 16/8, 2016 at 7:33 Comment(0)
P
10

Please check http://jenkins_server_ip:8080/configureSecurity/

[TCP port for JNLP slave agents] should NOT be [Disable]

Punkie answered 16/8, 2016 at 7:36 Comment(1)
Under Manage Jenkins, enabled the "TCP port for JNLP slave agents" to be random, and that allowed the slave to connect to Jenkins.Punkie

© 2022 - 2024 — McMap. All rights reserved.