Compiled Resource:
------------------
Declared in /etc/chef/src/cookbooks/apache/recipes/default.rb:2:in `from_file`
package("apache2-mpm-prefork") do
action :install
retries 0
retry_delay 2
package_name "apache2-mpm-prefork"
cookbook_name :apache
recipe_name "default"
end
错误:
[2017-09-14T04:11:09-07:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2017-09-14T04:11:09-07:00] ERROR: Running exception handlers Running handlers complete
[2017-09-14T04:11:09-07:00] ERROR: Exception handlers complete
[2017-09-14T04:11:09-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 17.146327157 seconds
[2017-09-14T04:11:09-07:00] ERROR: package[apache2-mpm-prefork] (apache::default line 2) had an error:
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '200'
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/provider/package/yum-dump.py --options --installed-provides
---- STDOUT: [option installonlypkgs] kernel kernel-bigmem installonlypkg(kernel-module) installonlypkg(vm)
kernel-enterprise kernel-smp kernel-debug kernel-unsupported
kernel-source kernel-devel kernel-PAE kernel-PAE-debug kernel-uek
kernel-uek-bigmem kernel-uek-firmware kernel-uek-enterprise
kernel-uek-smp kernel-uek-debug kernel-uek-unsupported
kernel-uek-source kernel-uek-devel kernel-uek-PAE kernel-uek-PAE-debug
STDERR: yum-dump Locking Error! Couldn't obtain an exclusive yum lock in 10 seconds. Giving up.
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/provider/package/yum-dump.py --options --installed-provides
----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.4/lib/chef/provider/package/yum-dump.py --options --installed-provides returned 200
[2017-09-14T04:11:09-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
答案 0 :(得分:0)
错误消息的重要部分是:
yum-dump锁定错误!无法在10秒内获得独家yum锁。放弃。
因此,yum
无法及时锁定包数据库,这是安装包所必需的。通常的原因是您的计算机上已经获得锁定的另一个正在运行的yum
进程,例如在另一个SSH会话中。