rackspace-cookbooks/elkstack

kibana recipe is throwing an error "you must specify 'resource_name" . Please help!!!

Aditya-prit opened this issue · 8 comments

Chef::Exceptions::InvalidResourceSpecification


You must specify `resource_name'!

Cookbook Trace:


/var/chef/cache/cookbooks/elkstack/recipes/kibana.rb:42:in `from_file'

Relevant File Content:


/var/chef/cache/cookbooks/betterknow-elk/recipes/kibana.rb:

35: webserver = node['kibana']['webserver']
36: kibana_user = node[webserver]['user']
37: else
38: kibana_user = 'nobody'
39: end
40: else
41: kibana_user = node['kibana']['user']
42>> kibana_user kibana_user do
43: name kibana_user
44: group kibana_user
45: home node['kibana']['install_dir']
46: action :create
47: end
48: end
49:
50: kibana_install 'kibana' do
51: user kibana_user

Running handlers:
[2016-02-10T12:45:23+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-02-10T12:45:23+00:00] ERROR: Exception handlers complete
[2016-02-10T12:45:23+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 3.164104127 seconds
[2016-02-10T12:45:23+00:00] ERROR: You must specify `resource_name'!
[2016-02-10T12:45:23+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Hi there -- Seems like you've just pasted a stack trace into a new issue. node['kibana']['user'] appears to be nil or empty.

I just used the same elkstack recipes. I didn't do any change.Even i used kibana_lwrp::install as recipe .But it is showing the same error. All recipes are working fine except kibana.rb.
I don't know where is the issue exactly.

I used only elkstack::kibana in my node as runlist. {{You must specify `resource_name'!}}.
Please see once.
Thanks in advance.

My node['kibana']['user'] is not nil or empty.

Perhaps it should take from kibana_lwrp.However I have explicitly written this in my attributes/kibana.rb
default['kibana']['user']= 'kibana'.

But I am getting the same error:
Chef::Exceptions::InvalidResourceSpecification


You must specify `resource_name'!

I see you've also opened lusis/chef-kibana#116. We're going to need an example of how you're calling elkstack, or kibana_lwrp, as well as the version of Chef and Kibana you're using. Thanks!

My chef version is 12.3.0 and elksatck version 6.0.4
I just used the depends 'elkstack', '~> 6.0.4' in metadata.rb
Did berks install . so many dependencies are installed including kibana_lwrp.
Just copy pasted the kibana.rb in both attributes and recipes.
Run the node with elkstack::kibana. Tried kibana_lwrp::install too.
Got the same error.

I realized that wherever 'do' statement executing such as kibana_user,kibana_install,kibana_web at
42,50 and 91 respectively.It is throwing error.

Even i used all the attributes of kibana_lwrp in my attributes of elkstack but it does not seem to be worked.

I believe resource is not recognized by the kibana recipes.
Something i need to write Chef::Resource[:kibana_lwrp].
May be I don't know exactly.

elkstack/attributes/kibana.rb is same as github of rackspace-cookbook/elkstack/attributes/kibana.rb
elkstack/recipes/kibana.rb is same as github of rackspace-cookbook/elkstack/recipes/kibana.rb

No changes!! Ditto Copy paste of code.

This cookbook won't work if you're just copying and pasting a few recipes out. There are internal dependencies, and attributes referenced across multiple files. Please show us a complete, full working (or broken) example so I can help you further.