I am trying to use sensu with chef-solo. Chef requires a data_bag file. Unfortunately I can’t locate any info about what need to go into a data_bag file for the sensu package. I wonder if anyone can give me a pointer?
Currently I have put a file ‘mycompany.json’ in ~/.chef/data_bags/sensu/
Can you copy the chef-stacktrace.out file? Looks like you’re passing an unexpected data type somewhere, but it’s not checked until it blows up somewhere in chef’s internals.
--
Daniel DeLeo
On Monday, November 3, 2014 at 4:18 PM, A. Kong wrote:
Hi
I am trying to use sensu with chef-solo. Chef requires a data_bag file. Unfortunately I can’t locate any info about what need to go into a data_bag file for the sensu package. I wonder if anyone can give me a pointer?
Currently I have put a file ‘mycompany.json’ in ~/.chef/data_bags/sensu/
Can you copy the chef-stacktrace.out file? Looks like you’re passing an unexpected data type somewhere, but it’s not checked until it blows up somewhere in chef’s internals.
--
Daniel DeLeo
On Monday, November 3, 2014 at 4:18 PM, A. Kong wrote:
Hi
I am trying to use sensu with chef-solo. Chef requires a data_bag file. Unfortunately I can’t locate any info about what need to go into a data_bag file for the sensu package. I wonder if anyone can give me a pointer?
Currently I have put a file ‘mycompany.json’ in ~/.chef/data_bags/sensu/
On Tuesday, November 4, 2014 at 4:20 AM, A. Kong wrote:
Hi Daniel,
Here is the content of /var/chef/cache/chef-stacktrace.out
Generated at 2014-11-04 11:40:08 +0000
Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests!
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:74:in rescue in load_signing_key' /usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:64:in load_signing_key'
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:38:in initialize' /usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in new'
/usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in initialize' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in new'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in http_api' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:93:in create'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:84:in create_or_update' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:57:in run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:380:in register' /usr/lib/ruby/vendor_ruby/chef/client.rb:486:in do_run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:199:in block in run' /usr/lib/ruby/vendor_ruby/chef/client.rb:193:in fork'
/usr/lib/ruby/vendor_ruby/chef/client.rb:193:in run' /usr/lib/ruby/vendor_ruby/chef/application.rb:208:in run_chef_client'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:312:in block in run_application' /usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in loop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in run_application' /usr/lib/ruby/vendor_ruby/chef/application.rb:66:in run'
/usr/bin/chef-client:25:in `'
This looks like it’s from a different chef-client run, it’s indicating a failure to read the private key it needs to establish its identity with the Chef Server.
BTW I have found out how to generate the data bag data file: https://github.com/sensu/sensu-chef/tree/master/examples/ssl
But it looks like you got it sorted out. I’ll dig a little deeper and see if I can find where we can improve the error messages.
Cheers, Tony
--
Daniel DeLeo
On 4 Nov 2014, at 4:36 pm, Daniel DeLeo <dan@kallistec.com (mailto:dan@kallistec.com)> wrote:
Can you copy the chef-stacktrace.out file? Looks like you’re passing an unexpected data type somewhere, but it’s not checked until it blows up somewhere in chef’s internals.
--
Daniel DeLeo
On Monday, November 3, 2014 at 4:18 PM, A. Kong wrote:
Hi
I am trying to use sensu with chef-solo. Chef requires a data_bag file. Unfortunately I can’t locate any info about what need to go into a data_bag file for the sensu package. I wonder if anyone can give me a pointer?
Currently I have put a file ‘mycompany.json’ in ~/.chef/data_bags/sensu/
On Tue, Nov 4, 2014 at 10:40 AM, Daniel DeLeo dan@kallistec.com wrote:
On Tuesday, November 4, 2014 at 4:20 AM, A. Kong wrote:
Hi Daniel,
Here is the content of /var/chef/cache/chef-stacktrace.out
Generated at 2014-11-04 11:40:08 +0000
Chef::Exceptions::PrivateKeyMissing: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests!
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:74:in rescue in load_signing_key' /usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:64:in load_signing_key'
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:38:in initialize' /usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in new'
/usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in initialize' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in new'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in http_api' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:93:in create'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:84:in create_or_update' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:57:in run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:380:in register' /usr/lib/ruby/vendor_ruby/chef/client.rb:486:in do_run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:199:in block in run' /usr/lib/ruby/vendor_ruby/chef/client.rb:193:in fork'
/usr/lib/ruby/vendor_ruby/chef/client.rb:193:in run' /usr/lib/ruby/vendor_ruby/chef/application.rb:208:in run_chef_client'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:312:in block in run_application' /usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in loop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in run_application' /usr/lib/ruby/vendor_ruby/chef/application.rb:66:in run'
/usr/bin/chef-client:25:in `'
This looks like it’s from a different chef-client run, it’s indicating a failure to read the private key it needs to establish its identity with the Chef Server.
Don't data bag item accesses assume you're in client-server mode and
thereby trigger the authentication code?
Tony, I'd suggest using chef-client in local mode rather than Solo if
you have data bags.
Julian
--
[ Julian C. Dunn jdunn@aquezada.com * Sorry, I'm ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
I am using chef-solo from vagrant. I probably should provide this context
at the beginning.
So in theory I shouldn't need to provide the data bag if I am just using
chef-solo. Is it right?
Cheers, Tony
On Wed, Nov 5, 2014 at 2:49 AM, Julian C. Dunn jdunn@aquezada.com wrote:
On Tue, Nov 4, 2014 at 10:40 AM, Daniel DeLeo dan@kallistec.com wrote:
On Tuesday, November 4, 2014 at 4:20 AM, A. Kong wrote:
Hi Daniel,
Here is the content of /var/chef/cache/chef-stacktrace.out
Generated at 2014-11-04 11:40:08 +0000
Chef::Exceptions::PrivateKeyMissing: I cannot read
/etc/chef/validation.pem, which you told me to use to sign requests!
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:74:in rescue in load_signing_key' /usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:64:in load_signing_key'
/usr/lib/ruby/vendor_ruby/chef/http/authenticator.rb:38:in initialize' /usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in new'
/usr/lib/ruby/vendor_ruby/chef/rest.rb:63:in initialize' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in new'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:111:in http_api' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:93:in create'
/usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:84:in create_or_update' /usr/lib/ruby/vendor_ruby/chef/api_client/registration.rb:57:in run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:380:in register' /usr/lib/ruby/vendor_ruby/chef/client.rb:486:in do_run'
/usr/lib/ruby/vendor_ruby/chef/client.rb:199:in block in run' /usr/lib/ruby/vendor_ruby/chef/client.rb:193:in fork'
/usr/lib/ruby/vendor_ruby/chef/client.rb:193:in run' /usr/lib/ruby/vendor_ruby/chef/application.rb:208:in run_chef_client'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:312:in block in run_application' /usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in loop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:304:in run_application' /usr/lib/ruby/vendor_ruby/chef/application.rb:66:in run'
/usr/bin/chef-client:25:in `'
This looks like it’s from a different chef-client run, it’s indicating a
failure to read the private key it needs to establish its identity with the
Chef Server.
Don't data bag item accesses assume you're in client-server mode and
thereby trigger the authentication code?
Tony, I'd suggest using chef-client in local mode rather than Solo if
you have data bags.
I am using chef-solo from vagrant. I probably should provide this context at
the beginning.
So in theory I shouldn't need to provide the data bag if I am just using
chef-solo. Is it right?
It depends how the author wrote the cookbook you're trying to use.
Based on your description, it sounds like they assume you are using
Chef Client (or at least Chef Client in local mode), and if so, you'll
need to provide a data bag.
I am using chef-solo from vagrant. I probably should provide this
context at
the beginning.
So in theory I shouldn't need to provide the data bag if I am just using
chef-solo. Is it right?
It depends how the author wrote the cookbook you're trying to use.
Based on your description, it sounds like they assume you are using
Chef Client (or at least Chef Client in local mode), and if so, you'll
need to provide a data bag.