Skip to content

Instantly share code, notes, and snippets.

@darkn3rd
Last active October 24, 2016 06:27
Show Gist options
  • Save darkn3rd/0c1d5a5f7e3577e27ae62fafc48f78c6 to your computer and use it in GitHub Desktop.
Save darkn3rd/0c1d5a5f7e3577e27ae62fafc48f78c6 to your computer and use it in GitHub Desktop.
#### SESSION ####
vagrant@workstation:~/chef-repo$ knife bootstrap ${ADDRESS} -V --sudo --ssh-user ${USER} --node-name ${NODE_NAME} --run-list ${RUN_LIST}
INFO: Using configuration from /home/vagrant/chef-repo/.chef/knife.rb
Doing old-style registration with the validation key at /home/vagrant/chef-repo/.chef/vagrantdev-validator.pem...
Delete your validation key in order to use your user credentials instead
Connecting to node
node -----> Existing Chef installation detected
node Starting the first Chef Client run...
node Starting Chef Client, version 12.5.1
node resolving cookbooks for run list: ["awesome_customers_ubuntu"]
node Synchronizing Cookbooks:
node - awesome_customers_ubuntu (0.1.0)
node - apt (4.0.2)
node - compat_resource (12.16.1)
node - firewall (2.5.2)
node - chef-sugar (3.4.0)
node - httpd (0.4.4)
node - mysql (7.2.0)
node - yum-mysql-community (1.0.0)
node - yum (4.1.0)
node - smf (2.2.8)
node - rbac (1.0.3)
node - mysql2_chef_gem (1.1.0)
node - build-essential (7.0.1)
node - seven_zip (2.0.2)
node - windows (2.0.2)
node - mingw (1.2.4)
node - mariadb (0.3.1)
node - yum-epel (1.0.2)
node - database (6.0.0)
node - postgresql (3.4.16)
node - openssl (6.0.0)
node Compiling Cookbooks...
node Recipe: chef-sugar::default
node * chef_gem[chef-sugar] action install
node
node ================================================================================
node Error executing action `install` on resource 'chef_gem[chef-sugar]'
node ================================================================================
node
node Errno::ENOMEM
node -------------
node Cannot allocate memory - fork(2)
node
node Cookbook Trace:
node ---------------
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb:106:in `build'
node /var/chef/cache/cookbooks/chef-sugar/recipes/default.rb:23:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/firewall/recipes/default.rb:20:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/firewall.rb:6:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/default.rb:7:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node
node Resource Declaration:
node ---------------------
node # In /var/chef/cache/cookbooks/chef-sugar/recipes/default.rb
node
node 23: chef_gem 'chef-sugar' do
node 24: version gem_version
node 25: compile_time true
node 26: end
node 27: else
node
node Compiled Resource:
node ------------------
node # Declared in /var/chef/cache/cookbooks/chef-sugar/recipes/default.rb:23:in `from_file'
node
node chef_gem("chef-sugar") do
node action [:install]
node retries 0
node retry_delay 2
node default_guard_interpreter :default
node package_name "chef-sugar"
node version "3.4.0"
node compile_time true
node gem_binary "/opt/chef/embedded/bin/gem"
node declared_type :chef_gem
node cookbook_name "chef-sugar"
node recipe_name "default"
node end
node
node
node ================================================================================
node Recipe Compile Error in /var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/default.rb
node ================================================================================
node
node Errno::ENOMEM
node -------------
node chef_gem[chef-sugar] (chef-sugar::default line 23) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
node
node Cookbook Trace:
node ---------------
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb:106:in `build'
node /var/chef/cache/cookbooks/chef-sugar/recipes/default.rb:23:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/firewall/recipes/default.rb:20:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/firewall.rb:6:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
node /var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/default.rb:7:in `from_file'
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
node
node Relevant File Content:
node ----------------------
node /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb:
node
node 99: emit_harmless_cloning_debug
node 100: else
node 101: emit_cloned_resource_warning
node 102: end
node 103: end
node 104:
node 105: # Run optional resource hook
node 106>> resource.after_created
node 107:
node 108: resource
node 109: end
node 110:
node 111: private
node 112:
node 113: def resource_class
node 114: # Checks the new platform => short_name => resource mapping initially
node 115: # then fall back to the older approach (Chef::Resource.const_get) for
node
node
node Running handlers:
node [2016-10-24T06:19:34+00:00] ERROR: Running exception handlers
node Running handlers complete
node [2016-10-24T06:19:34+00:00] ERROR: Exception handlers complete
node Chef Client failed. 0 resources updated in 12 seconds
node [2016-10-24T06:19:34+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
node [2016-10-24T06:19:34+00:00] ERROR: chef_gem[chef-sugar] (chef-sugar::default line 23) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
node [2016-10-24T06:19:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
#### FROM NODE #####
vagrant@node:~$ sudo cat /var/chef/cache/chef-stacktrace.out
Generated at 2016-10-24 06:19:34 +0000
Errno::ENOMEM: chef_gem[chef-sugar] (chef-sugar::default line 23) had an error: Errno::ENOMEM: Cannot allocate memory - fork(2)
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.1/lib/mixlib/shellout/unix.rb:316:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.1/lib/mixlib/shellout/unix.rb:316:in `fork_subprocess'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.1/lib/mixlib/shellout/unix.rb:93:in `run_command'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.1/lib/mixlib/shellout.rb:259:in `run_command'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/shell_out.rb:97:in `shell_out_command'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/shell_out.rb:50:in `shell_out'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/shell_out.rb:55:in `shell_out!'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:501:in `shell_out_with_timeout!'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package/rubygems.rb:541:in `install_via_gem_command'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package/rubygems.rb:522:in `install_package'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:93:in `block in action_install'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/why_run.rb:52:in `call'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider.rb:175:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:92:in `action_install'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider.rb:144:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource.rb:585:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource/chef_gem.rb:60:in `block in after_created'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource/chef_gem.rb:59:in `each'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource/chef_gem.rb:59:in `after_created'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb:106:in `build'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/recipe.rb:108:in `build_resource'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/recipe.rb:69:in `declare_resource'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/resources.rb:15:in `chef_gem'
/var/chef/cache/cookbooks/chef-sugar/recipes/default.rb:23:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/cookbook_version.rb:228:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/var/chef/cache/cookbooks/firewall/recipes/default.rb:20:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/cookbook_version.rb:228:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/firewall.rb:6:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/cookbook_version.rb:228:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:303:in `block in include_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `each'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:302:in `include_recipe'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/var/chef/cache/cookbooks/awesome_customers_ubuntu/recipes/default.rb:7:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/cookbook_version.rb:228:in `load_recipe'
/var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb:347:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_context/cookbook_compiler.rb:140:in `block in compile_recipes'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_context/cookbook_compiler.rb:138:in `each'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_context/cookbook_compiler.rb:138:in `compile_recipes'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_context/cookbook_compiler.rb:75:in `compile'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/run_context.rb:158:in `load'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/policy_builder/expand_node_object.rb:91:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:485:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:266:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:270:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:258:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:258:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:224:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:212:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application/client.rb:408:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application/client.rb:398:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application/client.rb:398:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application/client.rb:388:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:60:in `run'
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:54:in `load'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment