2

我在配置 AWS 实例时遇到了这个错误:看起来 mongodb 的厨师食谱坏了。有没有人见过这个错误?

10.128.0.206 Compiling Cookbooks...
10.128.0.206 
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/provider/lwrp_base.rb:97: warning: already initialized constant JavaArk
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/resource/lwrp_base.rb:51: warning: already initialized constant JavaArk
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/provider/lwrp_base.rb:97: warning: already initialized constant AptPreference
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/provider/lwrp_base.rb:97: warning: already initialized constant AptRepository
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/resource/lwrp_base.rb:51: warning: already initialized constant AptPreference
10.128.0.206 /var/lib/gems/1.8/gems/chef-11.2.0/bin/../lib/chef/resource/lwrp_base.rb:51: warning: already initialized constant AptRepository
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Cloning resource attributes for execute[apt-get update] from prior resource (CHEF-3694)
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Previous execute[apt-get update]: /var/chef/cache/cookbooks/apt/recipes/default.rb:29:in `from_file'
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Current  execute[apt-get update]: /var/chef/cache/cookbooks/mongodb/recipes/10gen_repo.rb:28:in `from_file'
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Cloning resource attributes for package[mongodb] from prior resource (CHEF-3694)
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Previous package[mongodb]: /var/chef/cache/cookbooks/mongodb/recipes/10gen_repo.rb:42:in `from_file'
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: Current  package[mongodb]: /var/chef/cache/cookbooks/mongodb/recipes/default.rb:22:in `from_file'
10.128.0.206 [2013-02-12T23:21:06+00:00] WARN: We are not using a configfile, as the daemons can be configured via commandline
10.128.0.206 
10.128.0.206 
10.128.0.206 ================================================================================
10.128.0.206 
10.128.0.206 Recipe Compile Error in /var/chef/cache/cookbooks/mongodb/recipes/default.rb
10.128.0.206 
10.128.0.206 ================================================================================
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 ArgumentError
10.128.0.206 
10.128.0.206 -------------
10.128.0.206 
10.128.0.206 wrong number of arguments (1 for 2)
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 Cookbook Trace:
10.128.0.206 
10.128.0.206 ---------------
10.128.0.206 
10.128.0.206   /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:122:in `notifies'
10.128.0.206   /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:122:in `from_file'
10.128.0.206   /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:119:in `from_file'
10.128.0.206   /var/chef/cache/cookbooks/mongodb/recipes/default.rb:38:in `from_file'
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 Relevant File Content:
10.128.0.206 
10.128.0.206 ----------------------
10.128.0.206 
10.128.0.206 /var/chef/cache/cookbooks/mongodb/definitions/mongodb.rb:
10.128.0.206 
10.128.0.206 115:      notifies :restart, "service[#{name}]"
10.128.0.206 116:    end
10.128.0.206 117:    
10.128.0.206 118:    # service
10.128.0.206 119:    service name do
10.128.0.206 120:      supports :status => true, :restart => true
10.128.0.206 121:      action service_action
10.128.0.206 122>>     notifies service_notifies
10.128.0.206 123:      if !replicaset_name.nil?
10.128.0.206 124:        notifies :create, "ruby_block[config_replicaset]"
10.128.0.206 125:      end
10.128.0.206 126:      if type == "mongos"
10.128.0.206 127:        notifies :create, "ruby_block[config_sharding]"
10.128.0.206 128:      end
10.128.0.206 129:      if name == "mongodb"
10.128.0.206 130:        # we don't care about a running mongodb service in these cases, all we need is stopping it
10.128.0.206 131:        ignore_failure true
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 
10.128.0.206 [2013-02-12T23:21:06+00:00] ERROR: Running exception handlers
10.128.0.206 [2013-02-12T23:21:06+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
10.128.0.206 [2013-02-12T23:21:06+00:00] ERROR: Exception handlers complete
10.128.0.206 Chef Client failed. 0 resources updated
10.128.0.206 
10.128.0.206 [2013-02-12T23:21:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
10.128.0.206 [2013-02-12T23:21:06+00:00] FATAL: ArgumentError: wrong number of arguments (1 for 2)
Record adchemy-auth-mgmt02.dev.aws.adchemy.net does not exist in route53, preparing to add
Traceback (most recent call last):
  File "/opt/aws/scripts/ec2create.py", line 450, in <module>
    main()
  File "/opt/aws/scripts/ec2create.py", line 275, in main
    createdns(args.name, args.env.lower())
  File "/opt/aws/scripts/ec2create.py", line 353, in createdns
    ip = nodejson['automatic']['ipaddress']
KeyError: 'ipaddress'

我们正在运行厨师版本 11。找到其他厨师角色。只有包含 mongodbb 配方的厨师角色才会失败。

4

0 回答 0