Reputation: 517
On my computer, when I try to run chef-client
, it fails with a mysterious error, even when I run it without arguments:
$ usr/local/bin/chef-client -z
[2017-11-20T18:02:07-08:00] WARN: No config file found or specified on command line, using command line options.
[2017-11-20T18:02:17-08:00] FATAL: SocketError: getaddrinfo: nodename nor servname provided, or not known
The chef version I have is one that I just installed with gem install chef -v 12.21.26
. If I install chef version 13, I don't get this problem.
When I run chef-solo
, I get the same issue.
$ chef-solo -l debug
[2017-11-21T13:12:08-08:00] WARN: *****************************************
[2017-11-21T13:12:08-08:00] WARN: Did not find config file: /etc/chef/solo.rb, using command line options.
[2017-11-21T13:12:08-08:00] WARN: *****************************************
[2017-11-21T13:12:08-08:00] INFO: Unable to access cache at /var/chef. Switching cache to /Users/buck/.chef
[2017-11-21T13:12:08-08:00] DEBUG: Current chef_repo_path is /Users/buck/.chef
[2017-11-21T13:12:08-08:00] INFO: Unable to access cache at /var/chef. Switching cache to /Users/buck/.chef
[2017-11-21T13:12:08-08:00] WARN: No cookbooks directory found at or above current directory. Assuming /Users/buck/.chef.
[2017-11-21T13:12:08-08:00] WARN: *****************************************
[2017-11-21T13:12:08-08:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2017-11-21T13:12:08-08:00] WARN: *****************************************
[2017-11-21T13:12:08-08:00] DEBUG: Sleeping for 0 seconds
[2017-11-21T13:12:13-08:00] FATAL: SocketError: getaddrinfo: nodename nor servname provided, or not known
What can I do to debug this?
Upvotes: 0
Views: 163
Reputation: 54181
This might mean that your server doesn't have localhost
set up correctly. In 13, we changed it to no longer actually bind the Zero server on localhost and do it via magic internal sockets. Just use chef-solo and it will go away.
Upvotes: 1