命令
knife ec2 server create -r "role[test1]" -I ami-axxxxxe --flavor t1.micro -x ubuntu --ssh-key JP_Key --availability-zone us-east-1c -p 22 --tags Name=test_knife2 --iam test-role --subnet subnet-cxxxxx8 --associate-eip 5x.xx.xx.x -g sg-xxxx
错误:
10.220.15.110 Synchronizing Cookbooks:
================================================================================
10.220.15.110 Error Syncing Cookbooks:
================================================================================
https://mychefserver.example.com/bookshelf/organization00000000000000000000000000000000/
chcksum-d7c3b4577ca3ce35e757fb4a72c895f2?&Expires=1386685120&Signature=%2BaZMqKMbCxiBS5JuuaDgGO0HSRo%3D - getaddrinfo: Name or service not known
Your chef_server_url may be misconfigured
当我在服务器输出中执行
knife client list
时是Chef客户端的实例ID这里的问题是客户端无法从服务器提取配方。
最佳答案
过去,当我遇到此问题时,是由于新计算机无法解析ChefServer而导致DNS问题。对于AWS / EC2,请确保DHCP分发的默认DNS服务器将正确解析您的Chefserver.example.com域名。