我在主厨的Amazon EC2 Linux上安装mongodb版本2.4.6
时遇到问题。
我正在使用流行的mongodb chef cookbook
我已采取措施确保我的运行列表在recipe[mongodb::10gen_repo]
之前指定recipe[mongodb::default]
。
我收到以下错误:
Recipe: mongodb::10gen_repo
* yum_repository[10gen] action addRecipe: <Dynamically Defined Resource>
* template[/etc/yum.repos.d/10gen.repo] action create (up to date)
* execute[yum-makecache-10gen] action nothing (skipped due to action :nothing)
* ruby_block[yum-cache-reload-10gen] action nothing (skipped due to action :nothing)
(up to date)
Recipe: mongodb::default
* package[mongo-10gen-server] action install
================================================================================
Error executing action `install` on resource 'package[mongo-10gen-server]'
================================================================================
Chef::Exceptions::Exec
----------------------
returned 1, expected 0
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/mongodb/recipes/default.rb
22: package node[:mongodb][:package_name] do
23: action :install
24: version node[:mongodb][:package_version]
25: end
26:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/mongodb/recipes/default.rb:22:in `from_file'
package("mongo-10gen-server") do
action [:install]
retries 0
retry_delay 2
package_name "mongo-10gen-server"
version "2.4.6-mongodb_1"
cookbook_name "mongodb"
recipe_name "default"
end
[2013-12-26T09:22:05+00:00] ERROR: Running exception handlers
[2013-12-26T09:22:05+00:00] ERROR: Exception handlers complete
[2013-12-26T09:22:05+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 5 resources updated
[2013-12-26T09:22:05+00:00] ERROR: package[mongo-10gen-server] (mongodb::default line 22) had an error: Chef::Exceptions::Exec: returned 1, expected 0
[2013-12-26T09:22:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
答案 0 :(得分:0)
您在哪里定义了node[:mongodb][:package_name]
?
为了使用该食谱,我相信您需要设置该属性。