我有一個非常簡單的廚師配方,試圖在EC2 & Vagrant VM(都運行Ubuntu 12.04)上安裝RabbitMQ和幾個RabbitMQ插件。通過廚師安裝RabbitMQ的例外
我使用Opscode公司RabbitMQ的食譜(https://github.com/opscode-cookbooks/rabbitmq),當我準備的機器(S)我得到以下堆棧跟蹤:
INFO: Processing apt_repository[rabbitmq] action add (rabbitmq::default line 43)
INFO: Processing remote_file[/srv/chef/file_store/rabbitmq-signing-key-public.asc] action create (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 36)
INFO: remote_file[/srv/chef/file_store/rabbitmq-signing-key-public.asc] updated
INFO: remote_file[/srv/chef/file_store/rabbitmq-signing-key-public.asc] mode changed to 644
INFO: Processing execute[install-key rabbitmq-signing-key-public.asc] action run (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 52)
INFO: execute[install-key rabbitmq-signing-key-public.asc] ran successfully
INFO: apt_repository[rabbitmq] sending run action to execute[apt-get update] (immediate)
INFO: Processing execute[apt-get update] action run (apt::default line 29)
INFO: execute[apt-get update] ran successfully
INFO: Processing remote_file[/srv/chef/file_store/rabbitmq-signing-key-public.asc] action nothing (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 36)
INFO: Processing execute[install-key rabbitmq-signing-key-public.asc] action nothing (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 52)
INFO: Processing execute[apt-get update] action nothing (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 78)
INFO: Processing file[/etc/apt/sources.list.d/rabbitmq-source.list] action create (/srv/chef/file_store/cookbooks/apt/providers/repository.rb line 89)
INFO: file[/etc/apt/sources.list.d/rabbitmq-source.list] created file /etc/apt/sources.list.d/rabbitmq-source.list
INFO: Processing package[util-linux] action install (rabbitmq::default line 53)
INFO: Processing package[rabbitmq-server] action install (rabbitmq::default line 54)
ERROR: package[rabbitmq-server] (rabbitmq::default line 54) has had an error
...
FATAL: Chef::Exceptions::Exec: package[rabbitmq-server] (rabbitmq::default line 54) had an error: Chef::Exceptions::Exec: apt-get -q -y install rabbitmq-server=2.7.1-0ubuntu4 returned 100, expected 0
正如您在日誌中看到的,apt-get update
發生在添加新的rabbitmq源之前(意思是它試圖從RabbitMQ存儲庫安裝rabbitmq-server版本2.7.1與2.8.x版本相比)。
這是食譜代碼:https://github.com/opscode-cookbooks/rabbitmq/blob/master/recipes/default.rb#L43-54
任何想法如何解決該問題?
不幸的是,這些補丁無法解決手頭的問題。我已經發布了關於如何在這個要點上重新創建的詳細信息:https://gist.github.com/3345845 – d2kagw 2012-08-14 02:30:53
對於那些遇到同樣問題的用戶,通過包含上述修補程序並將Chef-Client升級到0.10.12 – d2kagw 2012-08-15 04:22:16