Recipe Compile Error in /var/chef/cache/cookbooks/elkstack/attributes/elasticsearch.rb
tiago-cruz-movile opened this issue · 3 comments
tiago-cruz-movile commented
Hello,
- Machine:
[root@logstash conf.d]# cat /etc/issue
CentOS release 6.7 (Final)
[root@logstash conf.d]# rpm -qa | grep chef
chef-12.5.1-1.el6.x86_64
- Recipe:
Run List: role[base], recipe[elkstack]
- Output:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/elkstack/attributes/elasticsearch.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/elkstack/attributes/elasticsearch.rb:28:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/elkstack/attributes/elasticsearch.rb:
21: default['elasticsearch']['allocated_memory'] = "#{es_mem}m"
22:
23: # force all traffic to eth1, including published cluster addresses
24: # (default for rackspace, override for others -- vagrant defaults to localhost)
25: default['elasticsearch']['network']['host'] = '_eth0:ipv4_'
26:
27: # rubocop:disable LineLength
28>> default['elasticsearch']['discovery']['search_query'] = "tags:elkstack AND chef_environment:#{node.chef_environment} AND elasticsearch_cluster_name:#{node['elasticsearch']['cluster']['name']} AND NOT name:#{node.name}"
29: # rubocop:enable LineLength
30:
31: # by default, won't do multicast
32: default['elasticsearch']['discovery']['zen']['ping']['multicast']['enabled'] = false
33:
34: # in order to use kibana, we must enable dynamic scripting
35: default['elasticsearch']['custom_config']['script.disable_dynamic'] = false
36:
37: # get on a much newer java, required by ES
Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 14 seconds
martinb3 commented
Hello! Actually, could you let me know what versions of elkstack and elasticsearch (cookbooks) you're on?
tiago-cruz-movile commented
Hello @martinb3,
The vestions are:
"name":"elkstack","version":"6.0.4"
"name":"elasticsearch","version":"2.1.0"
I did the knife cookbook site install elkstack
yesterday, so I think that I'm using the latest versions
Also, there is no version elasticsearch ~> 0.3.14
here:
https://supermarket.chef.io/cookbooks/elasticsearch
Thanks a lot!
martinb3 commented
elkstack is pinned to a much older version of the Elasticsearch cookbook via the metadata.rb. It won't be compatible with "name":"elasticsearch","version":"2.1.0"
.