[英]Jenkins remote build with Parameterized Trigger Plugin failed
I am using Jenkins along with Parameterized Trigger Plugin for triggering a job remotely. 我正在使用Jenkins和参数化触发插件来远程触发作业。 The build trigger is failed with console output as below
构建触发器因控制台输出而失败,如下所示
Server returned HTTP response code: 403 for URL: http://x.x.x.x:8080/job/jobname/buildWithParameters?token=buildcommand&build&delay=0
Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
Retry attempt #1 out of 5
Server returned HTTP response code: 403 for URL: http://x.x.x.x:8080/job/jobname/buildWithParameters?token=buildcommand&build&delay=0
Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
ERROR: Remote build failed for the following reason:
The build with URL ' http://xxxx:8080/job/jobname/build?token=buildcommand&build&delay=0
' from a browser is able to trigger the build remotely. 来自浏览器的URL“
http://xxxx:8080/job/jobname/build?token=buildcommand&build&delay=0
”的构建能够远程触发构建。
I only see the difference between two URL is one uses 'build' and other has 'buildWithParameters'. 我只看到两个URL之间的区别是一个使用'build'而另一个使用'buildWithParameters'。
Could you please help me to resolve the same. 你能帮我解决一下吗?
Had the same issue where my remote jenkins was using credentials that were passed in by the master build. 有同样的问题,我的远程jenkins使用由主构建传递的凭据。 To fix it I had to disable CSRF protection on the target Jenkins:
要修复它,我必须在目标 Jenkins上禁用CSRF保护:
No need to restart Jenkins, just try the master job again. 无需重启Jenkins,只需再次尝试主作业。
Caveat: Obviously your Jenkins server is without CSRF protection... but it's probably safely behind a corporate firewall anyway, right? 警告:显然你的Jenkins服务器没有CSRF保护......但它可能安全地落后于企业防火墙,对吧?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.