popularity question answers views user  
1
knife bootstrap fails ssh authentication on centos 6

I am bootstrapping a vm using knife which works on CentOS 5.4 but fails on CentOS 6.2 when attempting to ssh onto the node with “ERROR: all authorization methods failed (tried publickey, password)”

I can ssh onto the vm, why can’t knife? Anyone else seen this issue?

knife cs server create test-centos-6 -N test-centos-6 -d chef-full -r “role[base],role[cs_server]” -x <user> -P <pword> —no-public-ip -T “CentOS 6.2 x64 LAMP Stack” -VV

Bootstrapping Chef on 10.110.66.244 DEBUG: Adding 10.110.66.244 DEBUG: establishing connection to 10.110.66.244:22 DEBUG: connection established INFO: negotiating protocol version DEBUG: remote is SSH-2.0-OpenSSH_5.3' DEBUG: local isSSH-2.0-Ruby/Net::SSH_2.2.2 x86_64-linux' DEBUG: read 784 bytes DEBUG: received packet nr 0 type 20 len 780 INFO: got KEXINIT from server INFO: sending KEXINIT DEBUG: queueing packet nr 0 type 20 len 556 DEBUG: sent 560 bytes INFO: negotiating algorithms DEBUG: negotiated: * kex: diffie-hellman-group-exchange-sha1 * host_key: ssh-rsa * encryption_server: aes128-cbc * encryption_client: aes128-cbc * hmac_client: hmac-sha1 * hmac_server: hmac-sha1 * compression_client: none * compression_server: none * language_client: * language_server: DEBUG: exchanging keys DEBUG: queueing packet nr 1 type 34 len 20 DEBUG: sent 24 bytes DEBUG: read 152 bytes DEBUG: received packet nr 1 type 31 len 148 DEBUG: queueing packet nr 2 type 32 len 140 DEBUG: sent 144 bytes DEBUG: read 720 bytes DEBUG: received packet nr 2 type 33 len 700 DEBUG: queueing packet nr 3 type 21 len 20 DEBUG: sent 24 bytes DEBUG: received packet nr 3 type 21 len 12 DEBUG: beginning authentication of `root' DEBUG: queueing packet nr 4 type 5 len 28 DEBUG: sent 52 bytes DEBUG: read 52 bytes DEBUG: received packet nr 4 type 6 len 28 DEBUG: trying publickey DEBUG: connecting to ssh-agent ERROR: could not connect to ssh-agent DEBUG: trying publickey (8b:b8:c2:ee:1e:56:cc:fc:ea:dc:e2:58:7d:00:e2:02) DEBUG: queueing packet nr 5 type 50 len 348 DEBUG: sent 372 bytes DEBUG: read 84 bytes DEBUG: received packet nr 5 type 51 len 60 DEBUG: allowed methods: publickey,gssapi-keyex,gssapi-with-mic,password DEBUG: trying password DEBUG: queueing packet nr 6 type 50 len 60 DEBUG: sent 84 bytes DEBUG: read 84 bytes DEBUG: received packet nr 6 type 51 len 60 DEBUG: allowed methods: publickey,gssapi-keyex,gssapi-with-mic,password DEBUG: password failed ERROR: all authorization methods failed (tried publickey, password)

more →
0 208  
0
Can't Bootstrap CentOS 5.4 ???

I am a noob….

I have been able to successfully bootstrap (add node) for both ubuntu 10.04 & oel5.4, but have had trouble with CentOS 5.4

For ubuntu I used: knife bootstrap <IP> -u <user> -P <password> —sudo

For oel: knife bootstrap <IP> -u root -P <password> -d centos5-gems

I tried the oel command on centos but I get an error:

centos1 /usr/lib/ruby/1.8/openssl/cipher.rb:22 centos1 : centos1 Cipher is not a module centos1 ( centos1 TypeError centos1 ) centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib/ruby/1.8/openssl.rb:20 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib/ruby/1.8/net/https.rb:102 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/rest.rb:23 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/search/query.rb:21 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language.rb:19 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource.rb:22 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/resource/file.rb:19 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/file.rb:21 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/provider/cookbook_file.rb:20 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/providers.rb:20 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef.rb:25 centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' centos1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire' centos1 from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:23 centos1 from /usr/bin/chef-client:19:in `load' centos1 from /usr/bin/chef-client:19

more →
0 201  
0
Chef::Handler::ErrorReport raised #<JSON::NestingError: nesting of 1000 is too deep>

Hello everyone, I came across an JSON error “JSON::NestingError: nesting of 1000 is too deep” when executing ‘sudo chef-client’ to setup a ubuntu-10-04-server-i386 machine as a hadoop name node. I ran cluster_chef on the my chef workstation node to launch and bootstrap the ubuntu node, then get the same error log reported when executing ‘sudo chef-client’ on the node it self. For debugging, I only add 2 “recipes [recipe[cluster_chef::dedicated_server_tuning], recipe[hadoop_cluster::namenode]] ” for the node.

Did anyone encounter this kind of issue and give some tips? Thanks in advance!!

———– ENV of the Ubuntun Node ———–

   Linux ubuntu-vm 2.6.32-33-generic-pae #70-Ubuntu SMP Thu Jul 7 22:51:12 UTC 2011 i686 GNU/Linux ruby 1.8.7
   (2010-01-10 patchlevel 249)
   [i486-linux] json (1.6.1) chef
   (0.10.8) ohai (0.6.10) Cookbook
   hadoop_cluster version is 0.9.7
   Cookbook hadoop version is 0.8.1
   Cookbook cluster_service_discovery is 0.1

—————-ERROR LOG ———–

ubuntu@ubuntu-vm:~$ sudo chef-client
[Fri, 27 Jan 2012 15:32:32 +0800] INFO: *** Chef 0.10.8 ***
[Fri, 27 Jan 2012 15:32:36 +0800] INFO: Run List is [recipe[cluster_chef::dedicated_server_tuning], recipe[hadoop_cluster::namenode]]
[Fri, 27 Jan 2012 15:32:36 +0800] INFO: Run List expands to [cluster_chef::dedicated_server_tuning, hadoop_cluster::namenode]
[Fri, 27 Jan 2012 15:32:36 +0800] INFO: Starting Chef Run for demohadoop-master-0
[Fri, 27 Jan 2012 15:32:36 +0800] INFO: Running start handlers
[Fri, 27 Jan 2012 15:32:36 +0800] INFO: Start handlers complete.
[Fri, 27 Jan 2012 15:32:39 +0800] INFO: Loading cookbooks [apt, aws, cluster_chef, cluster_service_discovery, ebs, hadoop_cluster, java, ubuntu]
[Fri, 27 Jan 2012 15:32:39 +0800] WARN: Missing gem 'right_aws'
[Fri, 27 Jan 2012 15:32:39 +0800] INFO: Couldn't set performance parameters from instance type, estimating from 1 cores and 1026096 ram
[Fri, 27 Jan 2012 15:32:39 +0800] INFO: Registering to provide demohadoop-namenode: {}
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: Running exception handlers
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: Report handler Chef::Handler::ErrorReport raised #<JSON::NestingError: nesting of 1000 is too deep>
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/json-1.6.1/lib/json/common.rb:278:in `generate'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/json-1.6.1/lib/json/common.rb:278:in `pretty_generate'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/json_compat.rb:48:in `to_json_pretty'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler/error_report.rb:27:in `report'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:218:in `run_report_unsafe'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:206:in `run_report_safely'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:112:in `run_exception_handlers'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:111:in `each'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:111:in `run_exception_handlers'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:119
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:110:in `call'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:110:in `run_failed'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:109:in `each'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:109:in `run_failed'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:170:in `run'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:26
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/bin/chef-client:19:in `load'
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: /usr/bin/chef-client:19
[Fri, 27 Jan 2012 15:32:39 +0800] ERROR: Exception handlers complete
[Fri, 27 Jan 2012 15:32:39 +0800] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[Fri, 27 Jan 2012 15:32:39 +0800] FATAL: JSON::NestingError: nesting of 1000 is too deep

ubuntu@ubuntu-vm:~$ cat /var/chef/cache/chef-stacktrace.out
Generated at Fri Jan 27 15:32:39 +0800 2012
JSON::NestingError: nesting of 1000 is too deep
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/json_compat.rb:44:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/rest.rb:219:in `api_request'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/rest.rb:130:in `put_rest'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:626:in `save'
/var/chef/cache/cookbooks/cluster_service_discovery/libraries/cluster_service_discovery.rb:73:in `provide_service'
/var/chef/cache/cookbooks/hadoop_cluster/recipes/namenode.rb:31:in `from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:72:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:69:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:69:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:195:in `setup_run_context'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:159:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
/usr/bin/chef-client:19
------------------

After I set Chef::JSONCompat::JSON_MAX_NESTING to 0 in /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/json_compat.rb, and run “sudo chef-client”, it reports this error “SystemStackError: stack level too deep” :

—————-ERROR LOG ———–

ubuntu@ubuntu-vm:~$ sudo chef-client
[Fri, 27 Jan 2012 15:36:56 +0800] INFO: *** Chef 0.10.8 ***
[Fri, 27 Jan 2012 15:36:59 +0800] INFO: Run List is [recipe[cluster_chef::dedicated_server_tuning], recipe[hadoop_cluster::namenode]]
[Fri, 27 Jan 2012 15:36:59 +0800] INFO: Run List expands to [cluster_chef::dedicated_server_tuning, hadoop_cluster::namenode]
[Fri, 27 Jan 2012 15:36:59 +0800] INFO: Starting Chef Run for demohadoop-master-0
[Fri, 27 Jan 2012 15:36:59 +0800] INFO: Running start handlers
[Fri, 27 Jan 2012 15:36:59 +0800] INFO: Start handlers complete.
[Fri, 27 Jan 2012 15:37:02 +0800] INFO: Loading cookbooks [apt, aws, cluster_chef, cluster_service_discovery, ebs, hadoop_cluster, java, ubuntu]
[Fri, 27 Jan 2012 15:37:02 +0800] WARN: Missing gem 'right_aws'
[Fri, 27 Jan 2012 15:37:02 +0800] INFO: Couldn't set performance parameters from instance type, estimating from 1 cores and 1026096 ram
[Fri, 27 Jan 2012 15:37:02 +0800] INFO: Registering to provide demohadoop-namenode: {}
[Fri, 27 Jan 2012 15:37:02 +0800] ERROR: Running exception handlers
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: Report handler Chef::Handler::ErrorReport raised #<SystemStackError: stack level too deep>
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/params_validate.rb:85:in `set_or_return'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:230:in `chef_environment'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:491:in `to_json'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/json-1.6.1/lib/json/common.rb:278:in `generate'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/json-1.6.1/lib/json/common.rb:278:in `pretty_generate'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/json_compat.rb:48:in `to_json_pretty'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler/error_report.rb:27:in `report'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:218:in `run_report_unsafe'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:206:in `run_report_safely'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:112:in `run_exception_handlers'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:111:in `each'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:111:in `run_exception_handlers'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/handler.rb:119
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:110:in `call'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:110:in `run_failed'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:109:in `each'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:109:in `run_failed'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:170:in `run'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:26
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/bin/chef-client:19:in `load'
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: /usr/bin/chef-client:19
[Fri, 27 Jan 2012 15:37:03 +0800] ERROR: Exception handlers complete
[Fri, 27 Jan 2012 15:37:03 +0800] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[Fri, 27 Jan 2012 15:37:03 +0800] FATAL: SystemStackError: stack level too deep

ubuntu@ubuntu-vm:~$ cat /var/chef/cache/chef-stacktrace.out
Generated at Fri Jan 27 15:37:03 +0800 2012
SystemStackError: stack level too deep
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/params_validate.rb:86:in `set_or_return'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:230:in `chef_environment'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:491:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:501:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/json_compat.rb:44:in `to_json'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/rest.rb:219:in `api_request'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/rest.rb:130:in `put_rest'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:626:in `save'
/var/chef/cache/cookbooks/cluster_service_discovery/libraries/cluster_service_discovery.rb:73:in `provide_service'
/var/chef/cache/cookbooks/hadoop_cluster/recipes/namenode.rb:31:in `from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/cookbook_version.rb:578:in `load_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:40:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/mixin/language_include_recipe.rb:27:in `include_recipe'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:72:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:69:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:69:in `load'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:195:in `setup_run_context'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/client.rb:159:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:239:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `loop'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application/client.rb:229:in `run_application'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/application.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
--------------------
more →
2 460  
0
Bootstrap windows VMs

Hey all, I would think this is more straightforward but I’m having issues bootstrapping a windows 7 VM. I’m following along with the documentation and I’ve tried to use both

knife bootstrap windows winrm <IP_Address> -x USERNAME -P PASSWORD

and

knife bootstrap windows ssh <IP_Address> -x USERNAME -P PASSWORD

but I’ve had no luck with either approach. It would be cool if someone who has had success bootstrapping windows machines could post a little something about how they went about it…Any help is great, thanks all!

more →
1 83  
0
knife bootstrap failing to register a node : HTTP 403

I am using chef 11 (server and client).

When I am trying to bootstrap a node using knife or just try to start the chef client I am getting the HTTP 403 error saying

Your validation client is not authorized to create the client for this node (HTTP 403). * There may already be a client named “test” * Your validation client (chef-validator) may have misconfigured authorization permissions.

by trying to run the chef-client in debug mode I observerd that when it tries to send a GET requext to the chef-server in port 443 to retrieve the clients the request fails and throws the HTTP 403 error.

Any clue about the root cause and the fix?

more →
1 136  
0
How to bootstrap a node without knife?

Hi, i would like to bootstrap a node without using knife (from within the node itself) (on ubuntu 12.04)
I can install ruby and chef-client, no problem. then i put inside /etc/chef the “client.rb” with the server_url, client_key and validation_client_name.
I also put the correct validator file in this directory. Now if i run “chef-client” the node accesses the server and gets configured on the server. however no roles/recipes/etc are run on the node. My question is, how can i give the client a list of recipes/roles to run on the first run? Also, i noticed that a first-boot.json file is generated (i tried using knife to simulate and it generated that file) with my roles/recipes inside, but “chef-client” seems to ignore it. Also, where would i put the attributes for the node?

Thanks in advance

more →
0 27  
0
When knife bootstrap. how can disable ohai plugin?

Hi… all..

I want disable ohai rackspace plugin when bootraping node. I traied this but it’s not..

$ knife bootstrap <ip> -j ‘{“ohai”: “disabled_plugin”: {[“rackspace”}}’

I confirmed that node’s first_run.json contains that json values. but It’s not disabled rackspace plugin.

how can i do?

more →
0 23  
0
Running knife commands in the background(using rc.local)

Hi,
I’ve written a rack application using grape which calls knife’s bootstrap command to bootstrap a VM.The following is the code to bootstrap
module Chef class Bootstrap < Grape::API format :json content_type :json,“application/json” params do

requires  :VM_IP, :type => String, :desc => "ip value"
requires  :VM_username, :type => String, :desc => "username"
requires  :VM_password, :type => String, :desc => "password"

end resource :virtualmachine

 post 'bootstrap' do
content_type "application/json" 
status "200"
body "Boostrapped Successfully!!!"

t1 = Thread.new do
         system "knife chefsolo bootstrap #{params[:VM_IP]} -x #{params[:VM_username]} -P '#{params[:VM_password]}'"
      end
    end
 end
end

end

When i start the app manually using “rackup -p 9000 config.ru”,the above code is working fine,I’ve added this command to /etc/rc.local file to start the service during startup. The service has been started successfully but bootstrapping is not working. I’ve tried replacing the knife commands with other system commands and those are working fine.Only knife commands are not working when i start the service in the background.Is there any specific reason for it?How can i modify the code to make that working?

more →
0 23  
0
Timeout with knife bootstrap windows winrm

I am receiving an error with my ‘knife bootstrap windows winrm FQDN’ command. It keeps timing out, and I’m not sure what I can do.

 C:\Users\USER>knife bootstrap windows winrm myserver.net
Bootstrapping Chef on myserver.net
Enter your password:
ERROR: Network Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (http://myserver.net:5985)
Check your knife configuration and network settings
more →
0 23