Chef infra Chef客户端v12提供了SocketError:getaddrinfo:nodename或servname,或者未知

Chef infra Chef客户端v12提供了SocketError:getaddrinfo:nodename或servname,或者未知,chef-infra,Chef Infra,在我的计算机上,当我尝试运行chef-client时,即使在没有参数的情况下运行,也会出现一个神秘的错误: $ 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: geta

在我的计算机上,当我尝试运行
chef-client
时,即使在没有参数的情况下运行,也会出现一个神秘的错误:

$ 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
我的chef版本是我刚刚安装的
gem install chef-v 12.21.26
。如果我安装chef版本13,我不会遇到这个问题

当我运行
chef solo
时,我会遇到同样的问题

$ 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

我能做些什么来调试它?

这可能意味着您的服务器没有正确设置
localhost
。在13中,我们将其更改为不再实际绑定localhost上的Zero服务器,而是通过神奇的内部套接字进行绑定。只需使用chef solo,它就会消失。

遗憾的是,这没有帮助。我在主要问题中添加了这方面的日志。你不能直接将
chef solo
放入,你需要实际使用chef solo。我不清楚。当我运行
chef solo
时,它会以与
chef client
相同的方式失败。