简体   繁体   English

/var/chef/cache/cookbooks/ambari/recipes/blueprints.rb中的配方编译错误

[英]Recipe Compile Error in /var/chef/cache/cookbooks/ambari/recipes/blueprints.rb

Recipe Compile Error in /var/chef/cache/cookbooks/ambari/recipes/blueprints.rb

NoMethodError
-------------
    undefined method `[]' for nil:NilClass

Cookbook Trace:
---------------
    /var/chef/cache/cookbooks/ambari/recipes/blueprints.rb:54:in `block in from_file'
    /var/chef/cache/cookbooks/ambari/recipes/blueprints.rb:53:in `from_file'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat  /monkeypatches/chef/run_context.rb:347:in `load_recipe'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/ambari/recipes/blueprints.rb:

    47:      end
    48:    end
    49:
    50:  basic_auth_parameters = "--user #{node['ambari']['admin_user']}:#{node['ambari']['admin_password']}"
    51:
    52:
    53:  file '/tmp/blueprint.json' do
    54>>   content Chef::JSONCompat.to_json_pretty(node['ambari']['blueprints']['blueprint_json'].to_hash)
    55:  end
    56:
    57:  file '/tmp/cluster.json' do
    58:    content Chef::JSONCompat.to_json_pretty(node['ambari']['blueprints']['cluster_json'].to_hash)
    59:  end
    60:
    61:  execute 'Init Blueprints' do
    62:    command "curl #{basic_auth_parameters} -H 'X-Requested-By:ambari-cookbook' --data @/tmp/blueprint.json #{ambari_server_fqdn}:8080/api/v1/blueprints/#{node['ambari']['blueprints']['blueprint_name']}"
    63:  end

Platform:
---------
x86_64-linux


Running handlers:
    [2016-11-27T13:15:03-06:00] ERROR: Running exception handlers
Running handlers complete
    [2016-11-27T13:15:03-06:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 09 seconds
    [2016-11-27T13:15:03-06:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
    [2016-11-27T13:15:03-06:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    [2016-11-27T13:15:03-06:00] ERROR: undefined method `[]' for nil:NilClass
    [2016-11-27T13:15:03-06:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

One of the intermediary keys in your node attribute is not set. 未设置节点属性中的中间键之一。 Either put a default value in your cookbook's attributes file or otherwise ensure that it is set. 将默认值放入食谱的属性文件中,或者确保已设置默认值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM