我有一个非常简单的厨师食谱,试图在EC2& amp;上安装RabbitMQ和几个RabbitMQ插件。 Vagrant VM(都运行Ubuntu 12.04)。
我正在使用OpsCode RabbitMQ手册(https://github.com/opscode-cookbooks/rabbitmq),当我配置机器时,我得到以下堆栈跟踪:
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 :(得分:0)
我有你需要的2个修复程序。
当添加新的repos时,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中获取并向我发出任何进一步的问题。
亚光@ Opscode公司