简体   繁体   English

使用参数化触发器插件的Jenkins远程构建失败

[英]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保护:

  1. Log into your target Jenkins and go to Manage Jenkins 登录到目标Jenkins并转到Manage Jenkins
  2. Go to Configure Global Security 转到配置全局安全性
  3. Scroll down to Prevent Cross Site Request Forgery exploits 向下滚动到防止跨站点请求伪造攻击
  4. Uncheck it 取消选中它
  5. Save changes 保存更改

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.

相关问题 Jenkins 参数化远程触发器插件返回错误构建的状态 - Jenkins Parameterized Remote Trigger Plugin Returning the Status of the Wrong Build Jenkins参数化远程触发器插件以返回内部版本号 - Jenkins Parameterized Remote Trigger Plugin to return build number jenkins参数化触发器插件来触发另一个构建 - jenkins Parameterized Trigger Plugin to trigger another build 无法使用jenkins参数化远程触发插件 - not able to use jenkins Parameterized Remote Trigger Plugin 如何根据来自 Build Failure Analyzer Jenkins 插件的错误类别发送电子邮件/触发参数化远程作业? - How to send email/trigger parameterized remote job based on error category from Build Failure Analyzer Jenkins plugin? 如何为jenkins参数化的远程触发器插件设置远程主机 - how to setup remote host for jenkins parameterized remote trigger plugin 如何在 Jenkins Pipeline 脚本中使用“参数化远程触发器插件”? - How to use “Parameterized Remote Trigger Plugin” in Jenkins Pipeline script? Jenkins参数化下游构建触发器插件 - 仅在某些分支上? - Jenkins parameterized downstream build trigger plugin - only on certain branch? Jenkins使用参数化触发器插件来构建带有确认的其他项目 - Jenkins use Parameterized Trigger Plugin to build other project with confirmation 参数化远程触发器插件不尊重构建令牌根 - Parameterized Remote Trigger plugin doesn't respect Build Token Root
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM