Jenkins頁面操作提示 "No valid crumb was included in the request"


一、問題描述(Problem Description):

在jenkins中創建新任務時候選擇“拷貝已存在任務”,點擊OK,跳轉到下一步時候彈出如下錯誤信息:"No valid crumb was included in the request"

jenkins new job -> copy existing job -> click OK -> "No valid crumb was included in the request"

jenkins 填寫構建參數,點擊“BUILD”,提示: "No valid crumb was included in the request"

二、運行環境(Environment):

apache + jboss-as-7.1.1.Final,Windows XP SP3,jdk 1.6.0_33

三、錯誤原因(Reason):

jenkins在http請求頭部中放置了一個名為.crumb的token。在使用了反向代理,並且在jenkins設置中勾選了“防止跨站點請求偽造(Prevent Cross Site Request Forgery exploits)”之后此token會被轉發服務器apache/nginx認為是不合法頭部而去掉。導致跳轉失敗。

The problem is that jenkins stores its' csrf token in a http header called '.crumb', AFAIK headers must only contain alphanumerics and dashes, and apache/nginx will remove invalid headers from the request (unless configured not to).

四、解決方案(Solution):

1.在apache/nginx中設置ignore_invalid_headers,或者:

2.在jenkins全局安全設置中取消勾選“防止跨站點請求偽造(Prevent Cross Site Request Forgery exploits)”。

1.Set ignore_invalid_headers in your apache/nginx server, or:

2.Uncheck "Prevent Cross Site Request Forgery exploits" in jenkins global security settings.

參考資料(References)

文章來源: https://blog.csdn.net/ljj_9/article/details/70056466


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM