Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install plugin 2.4.1 #308

Closed
corsarof opened this issue Mar 31, 2015 · 6 comments
Closed

Cannot install plugin 2.4.1 #308

corsarof opened this issue Mar 31, 2015 · 6 comments

Comments

@corsarof
Copy link

Hi,

I am getting this exception

[2015-03-30T15:14:45+01:00] FATAL: RuntimeError: ruby_blockInstall plugin: elasticsearch/elasticsearch-cloud-aws/2.4.1 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 ?

@karmi
Copy link
Contributor

karmi commented Mar 31, 2015

So what happens when you try to install the plugin manually with /usr/local/bin/plugin -install elasticsearch/elasticsearch-cloud-aws/2.4.1?

@corsarof
Copy link
Author

I can install but I would need the code on the cookbook to do that automatically.

To install the plugin manually in fact i need to remove the old one and upload the new one in the specific path.

@corsarof
Copy link
Author

Bear in mind we had the very same recipe working fine last week: has anything changed upstream?

@karmi
Copy link
Contributor

karmi commented Mar 31, 2015

Nothing changed in the cookbook I am aware of.

I can install but I would need the code on the cookbook to do that automatically.

Of course, but you need to be sure you can perform the command manually.

To install the plugin manually in fact i need to remove the old one and upload the new one in the specific path.

Sorry, don't understand this part.

@corsarof
Copy link
Author

I mean installing ES 1.4.4 I get this plugin in /usr/local/elasticsearch-1.4.4/plugins/cloud-aws --> elasticsearch-cloud-aws-1.14.0.jar

I am expecting version 2.4.1 as per your table --> https://github.com/elastic/elasticsearch-cloud-aws

Is this a known issue? I can fix it manually but I would imagine installing 1.4.4 I would get the correct plugin.

@corsarof
Copy link
Author

I think I found the fix: JDK 1.7.0_55 is required as minumum to install the plugin of version > 1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants