CodeMazeBlog/docker-series

stopping Jenkins-slave won't get it to connect again

mr-awk opened this issue · 1 comments

Hi!

I have followed this article and everything works the first time doing docker-compose up. Then I do docker-compose stop to not lose all the settings.

Next time I do docker-compose up jenkins-slave won't boot properly with the following from the logs:

http://172.18.0.2:8082/jnlpJars/slave.jar
Downloaded Jenkins slave jar.
Cleaned up working directory.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403 No valid crumb was included in the request</h2>
<table>
<tr><th>URI:</th><td>/computer/doCreateItem</td></tr>
<tr><th>STATUS:</th><td>403</td></tr>
<tr><th>MESSAGE:</th><td>No valid crumb was included in the request</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.22.v20191022</a><hr/>
</body>
</html>

Traceback (most recent call last):
  File "/var/lib/jenkins/slave.py", line 80, in <module>
    slave_create(slave_name, os.getcwd(), os.environ['SLAVE_EXECUTORS'], os.environ['SLAVE_LABELS'])
  File "/var/lib/jenkins/slave.py", line 27, in slave_create
    j.node_create(node_name, working_dir, num_executors = int(executors), labels = labels, launcher = NodeLaunchMethod.JNLP)
  File "build/bdist.linux-x86_64/egg/jenkins.py", line 785, in node_create
  File "build/bdist.linux-x86_64/egg/jenkins.py", line 436, in create
jenkins.JenkinsError: create "docker-slave-acd469dc0e9b" failed

haven't figured out the problem yet and would like some help!
Thanks in advance!

found out that it is the CSRF protection that is making this problem. Turned it off and it worked.