我正在使用廚師安裝和配置非常基本的Jenkins安裝。當我嘗試運行以下配方:廚師 - 食譜包未能找到候選版本
include_recipe "apt::default"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
components ["binary/"]
action :add
end
package "jenkins" do
version '2.62'
end
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
我收到以下錯誤(在終端上顯示):
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Running exception handlers
192.168.9.207 Running handlers complete
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Exception handlers complete
192.168.9.207 Chef Client failed. 2 resources updated in 20 seconds
192.168.9.207 [2017-05-25T10:50:58-04:00] INFO: Sending resource update report (run-id: 2b59b80e-b787-4e93-805b-837b4d3264fb)
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: apt_package[jenkins] (jenkins-installation::default line 21) had an error: Chef::Exceptions::Package: No candidate version available for jenkins
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
的錯誤解釋,有沒有可用的候選版本詹金斯。運行失敗後,如果我執行sudo收到以下錯誤管理節點上的apt-get update更新:
Err http://pkg.jenkins-ci.org trusty/binary/ amd64 Packages
404 Not Found
Err http://pkg.jenkins-ci.org trusty/binary/ i386 Packages
404 Not Found
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en_US
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en
Fetched 5,976 kB in 3s (1,528 kB/s)
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-amd64/Packages 404 Not Found
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
我是相當新的廚師。此錯誤似乎與檢索Jenkins軟件包有關,但我不確定如何解決此錯誤。請讓我知道是否需要額外的信息來解決這個問題。
非常感謝大家提前提供任何指導。我已經通過廚師文檔進行了搜索,但除了指定軟件包版本外,沒有看到太多內容:https://docs.chef.io/resource_package.html。
爲'package'資源將者均基於'version'說法。不適用於apt。你必須使用明確的固定釘(這是一個PITA)。 – StephenKing