【问题标题】:RabbitMQ exceptions when installing through Chef通过 Chef 安装时出现 RabbitMQ 异常
【发布时间】:2012-08-09 07:04:11
【问题描述】:

我有一个非常简单的厨师食谱,它尝试在 EC2 和 Vagrant VM(均运行 Ubuntu 12.04)上安装 RabbitMQ 和几个 RabbitMQ 插件。

我正在使用 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

有解决问题的方法吗?

【问题讨论】:

    标签: rabbitmq ubuntu-12.04 chef-infra apt


    【解决方案1】:

    我有你需要的 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 食谱更新修复了它。今天已合并到https://github.com/opscode-cookbooks/rabbitmqmaster。

    这两本食谱的新版本应该可以解决所有问题,希望这周。在此期间,请随时从 github 获取,如有任何其他问题请联系我。

    matt@opscode

    【讨论】:

    • 不幸的是,这些补丁并不能解决当前的问题。我已在此要点上发布了有关如何重新创建的详细信息:gist.github.com/3345845
    • 对于那些遇到同样问题的人,通过包含上述补丁并将 Chef-Client 升级到 0.10.12 解决了这个问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-30
    • 2017-07-08
    • 1970-01-01
    • 2013-08-17
    • 1970-01-01
    相关资源
    最近更新 更多