![无法连接到 chef 服务器](https://linux22.com/image/706420/%E6%97%A0%E6%B3%95%E8%BF%9E%E6%8E%A5%E5%88%B0%20chef%20%E6%9C%8D%E5%8A%A1%E5%99%A8.png)
无法从工作站连接到 chef-server。尝试使用命令“knife node list”
Network Error: Error connecting to https://<chef-server-address>/nodes - Failed to open TCP connection to <chef-server-address>
(getaddrinfo: Name or service not known)
Check your knife configuration and network settings
这是我的刀锉
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "node-name"
client_key "#{current_dir}/<chef-server-address>.pem"
validation_client_name "chef-validator"
validation_key "#{current_dir}/chef-validator.pem"
chef_server_url "https://<chef-server-address>"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
答案1
chef_server_url "https://<chef-server-address>"
更改此参数,并粘贴您的 chef 服务器的实际地址