Closed corsarof closed 9 years ago
Sorry. I have no idea and I'm not sure it's an issue with the plugin itself but more with the way you wrote the cookbook???
May be @karmi or @electrical could have an idea?
Closing for now but feel free to reopen if you guys think it's an issue with the plugin itself.
@corsarof It's not clear what the reason for the expection is from the backtrace, but please open an issue at https://github.com/elastic/cookbook-elasticsearch
Moved to elastic/cookbook-elasticsearch#308
Hi,
I am getting this exception [2015-03-30T15:14:45+01:00] FATAL: RuntimeError: ruby_block[Install plugin: elasticsearch/elasticsearch-cloud-aws/2.4.1](elasticsearch::aws line 35) had an error: RuntimeError: [!] Failed to install plugin
Error executing action
create
on resource 'ruby_block[Install plugin: elasticsearch/elasticsearch-cloud-aws/2.4.1]'RuntimeError
[!] Failed to install plugin
Cookbook Trace:
/opt/chef-repo/site-cookbooks/elasticsearch/libraries/install_plugin.rb:43:in `block (2 levels) in install_plugin'
Resource Declaration:
In /opt/chef-repo/site-cookbooks/elasticsearch/libraries/install_plugin.rb
35: ruby_block "Install plugin: #{name}" do 36: block do 37: version = params['version'] ? "/#{params['version']}" : nil 38: url = params['url'] ? " -url #{params['url']}" : nil 39: 40: command = "/usr/local/bin/plugin -install #{name}#{version}#{url}" 41: Chef::Log.debug command 42: 43: raise "[!] Failed to install plugin" unless system command 44: 45: # Ensure proper permissions 46: raise "[!] Failed to set permission" unless system "chown -R #{node.elasticsearch[:user]}:#{node.elasticsearch[:user]} #{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/plugins/" 47: end 48: 49: notifies :restart, 'service[elasticsearch]' unless node.elasticsearch[:skip_restart] 50: 51: not_if do 52: Dir.entries("#{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/plugins/").any? do |plugin| 53: next if plugin =~ /^./ 54: name.include? plugin 55: end rescue false 56: end 57: 58: end 59: 60: end 61:
Compiled Resource:
Declared in /opt/chef-repo/site-cookbooks/elasticsearch/libraries/install_plugin.rb:35:in `install_plugin'
ruby_block("Install plugin: elasticsearch/elasticsearch-cloud-aws/2.4.1") do action "create" retries 0 retry_delay 2 block_name "Install plugin: elasticsearch/elasticsearch-cloud-aws/2.4.1" cookbook_name :elasticsearch recipe_name "aws" block #Proc:0x00000005845be8@/opt/chef-repo/site-cookbooks/elasticsearch/libraries/install_plugin.rb:36 not_if { #code block } end
This happens also if I deceide to install the previous version 1.14.0: any hints ?
Do I need to specify aws_key and secret_key in aws.rb ?