【发布时间】:2014-03-04 17:18:49
【问题描述】:
我正在尝试使用 Vagrant 和 chef-client 配置 VM,但在遇到 chef-client 配置块时出现错误。我的厨师服务器设置在我的本地网络上。
我的 VagrantFile 看起来像这样:
config.vm.provision :chef_client do |chef|
chef.chef_server_url = "https://api.mychefserver.domain.com/organizations/org1"
chef.validation_client_name = "org1-validator"
chef.validation_key_path = "./chef-repo/.chef/org1-validator.pem"
chef.add_recipe "my_recipe"
chef.delete_node = true
chef.delete_client = true
end
vagrant/chef-client 的输出给了我这个错误:
[2014-03-04T11:10:22-06:00] INFO: *** Chef 11.10.4 ***
[2014-03-04T11:10:22-06:00] INFO: Chef-client pid: 16217
Creating a new client identity for vagrant-poc1.domain.com using the validator key.
[2014-03-04T11:10:22-06:00] INFO: Client key /etc/chef/client.pem is not present - registering
================================================================================
Chef encountered an error attempting to create the client "vagrant-poc1.domain.com"
================================================================================
Network Error:
--------------
There was a network error connecting to the Chef Server:
Error connecting to https://api.mychefserver.domain.com/organizations/org1/clients - getaddrinfo: Name or service not known
Relevant Config Settings:
-------------------------
chef_server_url "https://api.mychefserver.domain.com/organizations/org1"
If your chef_server_url is correct, your network could be down.
[2014-03-04T11:10:22-06:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
关于可能导致问题的任何想法。我最好的猜测是我为我的厨师服务器使用了不正确的 url,但我似乎找不到任何可以告诉我正确格式的东西。
【问题讨论】:
标签: chef-infra vagrant