Skip to content

Instantly share code, notes, and snippets.

@vignesh-v3
Created November 15, 2016 18:50
Show Gist options
  • Save vignesh-v3/48d056b56e0e9d2bf34b81c2e93ffbde to your computer and use it in GitHub Desktop.
Save vignesh-v3/48d056b56e0e9d2bf34b81c2e93ffbde to your computer and use it in GitHub Desktop.
[ec2-user@ip-172-31-12-212 ~]$ sudo chef-client
Starting Chef Client, version 12.16.42
resolving cookbooks for run list: ["motd"]
Synchronizing Cookbooks:
- motd (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 1 resources
Recipe: motd::default
* template[/etc/motd] action create[2016-11-15T18:49:32+00:00] WARN: File /etc/motd managed by template[/etc/motd] is really a symlink. Managing the source file instead.
[2016-11-15T18:49:32+00:00] WARN: Disable this warning by setting `manage_symlink_source true` on the resource
[2016-11-15T18:49:32+00:00] WARN: In a future Chef release, 'manage_symlink_source' will not be enabled by default
================================================================================
Error executing action `create` on resource 'template[/etc/motd]'
================================================================================
Chef::Mixin::Template::TemplateError
------------------------------------
undefined method `[]' for nil:NilClass
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/motd/recipes/default.rb
9: template "/etc/motd" do
10: source "motd.erb"
11: mode "0644"
12: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/motd/recipes/default.rb:9:in `from_file'
template("/etc/motd") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source "motd.erb"
declared_type :template
cookbook_name "motd"
recipe_name "default"
mode "0644"
path "/etc/motd"
end
Template Context:
-----------------
on line #1
1: Thgis s my motd created by <%= node["mode"]["author"] %>
Platform:
---------
x86_64-linux
Running handlers:
[2016-11-15T18:49:32+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-11-15T18:49:32+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-11-15T18:49:32+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-11-15T18:49:32+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-11-15T18:49:32+00:00] ERROR:
Chef::Mixin::Template::TemplateError (undefined method `[]' for nil:NilClass) on line #1:
1: Thgis s my motd created by <%= node["mode"]["author"] %>
(erubis):1:in `block in evaluate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/mixin/template.rb:161:in `_render_template'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/mixin/template.rb:147:in `render_template'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/template/content.rb:53:in `file_for_provider'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/file_content_management/content_base.rb:40:in `tempfile'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/file.rb:462:in `tempfile'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/file.rb:339:in `do_generate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider/file.rb:150:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/runner.rb:69:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/runner.rb:97:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/runner.rb:97:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/runner.rb:97:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/2.3.0/forwardable.rb:189:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/runner.rb:96:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/client.rb:669:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/client.rb:664:in `catch'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/client.rb:664:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/client.rb:703:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/client.rb:283:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:294:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:282:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:282:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:247:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:235:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/lib/chef/application.rb:59:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.16.42/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:54:in `load'
/usr/bin/chef-client:54:in `<main>'
[2016-11-15T18:49:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[ec2-user@ip-172-31-12-212 ~]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment