2012-08-13 112 views
0

我有一個非常簡單的廚師配方,試圖在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

任何想法如何解決該問題?

回答

0

我有你需要的2個修復程序。

當添加新的回購協議時,apt_repository未啓動正確的apt-get更新。 http://tickets.opscode.com/browse/COOK-1530有修復。

rabbitmq的apt_repository沒有觸發apt-get更新 http://tickets.opscode.com/browse/COOK-1496,apt cookbook更新修復了它。今天合併爲https://github.com/opscode-cookbooks/rabbitmq大師。

2本烹飪書的新版本應該可以解決所有問題,希望本週。在此期間,您可以隨時從github中獲取信息,並可以通過任何進一步的問題向我發送請求。

matt @ opscode

+0

不幸的是,這些補丁無法解決手頭的問題。我已經發布了關於如何在這個要點上重新創建的詳細信息:https://gist.github.com/3345845 – d2kagw 2012-08-14 02:30:53

+0

對於那些遇到同樣問題的用戶,通過包含上述修補程序並將Chef-Client升級到0.10.12 – d2kagw 2012-08-15 04:22:16