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

"ArgumentError: wrong number of arguments (1 for 0)" at resource_configure.rb #386

Closed
phanhaiquang opened this issue Oct 29, 2015 · 1 comment

Comments

@phanhaiquang
Copy link

Hi,

I am getting below errors. I tried with chef-client version 12.4.1, 12.4.3, 12.5.x. But there is same problem.

Relevant File Content:

/home/deploy/chef-solo/cookbooks-3/elasticsearch/libraries/resource_configure.rb:

1:
2: class Chef
3: # Chef Resource for configuring an Elasticsearch node
4: #
5: class Resource::ElasticsearchConfigure < Chef::Resource::LWRPBase
6>> resource_name :elasticsearch_configure if respond_to?(:resource_name)
7:
8: actions(:manage, :remove)
9: default_action :manage
10:
11: # if you override one of these, you should probably override them all
12: attribute(:dir, kind_of: String, default: '/usr/local') # creates /usr/local/elasticsearch
13: attribute(:path_conf, kind_of: String, default: nil) # default "/usr/local/etc/elasticsearch"
14: attribute(:path_data, kind_of: String, default: nil) # default "/usr/local/var/data/elasticsearch"
15: attribute(:path_logs, kind_of: String, default: nil) # default "/usr/local/var/log/elasticsearch"

[2015-10-29T12:55:11-04:00] ERROR: Running exception handlers
[2015-10-29T12:55:11-04:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2015-10-29T12:55:11-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-10-29T12:55:11-04:00] FATAL: ArgumentError: wrong number of arguments (1 for 0)
ERROR: RuntimeError: chef-solo failed. See output above.

Below is content of /var/chef/cache/chef-stacktrace.out

Generated at 2015-10-29 12:55:11 -0400
ArgumentError: wrong number of arguments (1 for 0)
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.2/lib/chef/resource/lwrp_base.rb:69:in resource_name' /home/deploy/chef-solo/cookbooks-3/elasticsearch/libraries/resource_configure.rb:6:inclass:ElasticsearchConfigure'
/home/deploy/chef-solo/cookbooks-3/elasticsearch/libraries/resource_configure.rb:5:in <class:Chef>' /home/deploy/chef-solo/cookbooks-3/elasticsearch/libraries/resource_configure.rb:2:in<top (required)>'

@martinb3
Copy link
Contributor

martinb3 commented Nov 2, 2015

Hi there!

It seems like you're definitely not using chef-client v12 or greater:

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.2

Please try versions < 1.0 of this cookbook with chef-client 11.x. Hope this helps,

Martin

@martinb3 martinb3 closed this as completed Nov 2, 2015
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