我正在使用厨师刀创建 ec2 实例。该过程一直很好,直到它向厨师服务器注册新创建的实例。
我正在使用我自己的厨师服务器。
当我执行 ec2 引导时,我得到以下信息:
my-ec2-instance-public-name ########################################## ( 97%)
my-ec2-instance-public-name ########################################### [100%]
my-ec2-instance-public-name Thank you for installing Chef!
my-ec2-instance-public-name Starting Chef Client, version 11.4.4
my-ec2-instance-public-name Creating a new client identity for i-fc1919ab using the validator key.
my-ec2-instance-public-name
my-ec2-instance-public-name ================================================================================
my-ec2-instance-public-name Chef encountered an error attempting to create the client "i-fc1919ab"
my-ec2-instance-public-name ================================================================================
my-ec2-instance-public-name
my-ec2-instance-public-name
my-ec2-instance-public-name Network Error:
my-ec2-instance-public-name --------------
my-ec2-instance-public-name There was a network error connecting to the Chef Server:
my-ec2-instance-public-name Error connecting to https://my-local-chef-server-name/clients - getaddrinfo: Name or service not known
my-ec2-instance-public-name
my-ec2-instance-public-name
my-ec2-instance-public-name
my-ec2-instance-public-name Relevant Config Settings:
my-ec2-instance-public-name -------------------------
my-ec2-instance-public-name chef_server_url "https://my-local-chef-server-name"
my-ec2-instance-public-name
my-ec2-instance-public-name If your chef_server_url is correct, your network could be down.
my-ec2-instance-public-name
my-ec2-instance-public-name
my-ec2-instance-public-name
my-ec2-instance-public-name [2013-07-22T05:45:55-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
my-ec2-instance-public-name [2013-07-22T05:45:55-04:00] FATAL: SocketError: Error connecting to https://my-local-chef-server-name/clients - getaddrinfo: Name or service not known
我已经替换了上面输出中的一些信息,以便将其粘贴到 stackoverflow 上。
上面提到的错误getaddrinfo: Name or service not known
不可能是真的,因为 DNS 解析工作正常。另外,我查看/var/chef/cache/chef-stacktrace.out
了我的 ec2 实例,它说了同样的话getaddrinfo: Name or service not known
现在,
如果我在主厨服务器所在的实验室中引导本地虚拟机,它就可以正常工作。
以下是本地 VM 引导的输出:
my-local-vm-name ########################################## ( 97%)
my-local-vm-name ########################################### [100%]
my-local-vm-name Thank you for installing Chef!
my-local-vm-name Starting Chef Client, version 11.4.4
my-local-vm-name Creating a new client identity for my-local-vm-name using the validator key.
my-local-vm-name resolving cookbooks for run list: []
my-local-vm-name Synchronizing Cookbooks:
my-local-vm-name Compiling Cookbooks...
my-local-vm-name [2013-07-22T14:56:14+05:30] WARN: Node my-local-vm-name has an empty run list.
my-local-vm-name Converging 0 resources
my-local-vm-name Chef Client finished, 0 resources updated
问题:
我无法弄清楚为什么我的 ec2 实例引导失败getaddrinfo: Name or service not known
而本地 vm 引导工作正常。有什么明显的我忽略了吗?任何帮助/建议都会对我有很大帮助。
谢谢。