Pages

Error: Chef::Exceptions::JSON::ParseError: parse error: premature EOF

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
52.0.234.85
52.0.234.85 Starting Chef Client, version 11.18.6
52.0.234.85
52.0.234.85 ================================================================================
52.0.234.85 Chef encountered an error attempting to load the node data for "first1"
52.0.234.85 ================================================================================
52.0.234.85
52.0.234.85 Unexpected Error:
52.0.234.85 -----------------
52.0.234.85 Chef::Exceptions::JSON::ParseError: parse error: premature EOF
52.0.234.85
52.0.234.85                      (right here) ------^
52.0.234.85
52.0.234.85 [2015-02-09T02:36:38-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
52.0.234.85 Chef Client failed. 0 resources updated in 0.854925495 seconds
52.0.234.85 [2015-02-09T02:36:38-05:00] ERROR: parse error: premature EOF
52.0.234.85
52.0.234.85                      (right here) ------^
52.0.234.85
52.0.234.85 [2015-02-09T02:36:38-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
 ✘ ⮀ ~/devops/learnChef ⮀


Solution:


Go to the knife.rb file (generally in ~/.chef/)
And change the


chef_server_url          'https://manage.chef.io/organizations/my_org'

to

chef_server_url          'https://api.opscode.com/organizations/my_org'