我遵循Opscode Youtube視頻中的步驟來創建apache食譜。Apache食譜無法啓動
~/chef-repo/cookbooks/apache/recipes/default.rb
package "apache2" do
action :install
end
service "apache2" do
action [:enable, :start]
end
cookbook_file "/var/www/index.html" do
source "index.html"
mode "0644"
end
但廚師客戶端失敗。
Running handlers: [2014-10-31T10:58:27+08:00] ERROR: Running exception handlers Running handlers complete [2014-10-31T10:58:27+08:00] ERROR: Exception handlers complete [2014-10-31T10:58:27+08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-sta cktrace.out Chef Client failed. 0 resources updated in 1.137832751 seconds [2014-10-31T10:58:27+08:00] ERROR: service[apache2] (apache::default line 14) ha d an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of /etc/init.d/apache2 start ---- STDOUT: * Starting web server apache2 Action 'start' failed. The Apache error log may have more information. ...fail! STDERR: (98)Address already in use: make_sock: could not bind to address 0.0.0.0 :80 no listening sockets available, shutting down Unable to open logs ---- End output of /etc/init.d/apache2 start ---- Ran /etc/init.d/apache2 start returned 1 [2014-10-31T10:58:27+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef ru n process exited unsuccessfully (exit code 1)
不知道你正在使用哪個操作系統,但如果它的rhel基於這可能是? https://github.com/svanzoest-cookbooks/apache2/issues/342 – 2015-04-30 20:20:39