命令我跑了:
knife bootstrap 10.x.x.x-x ec2-x-i xx.pem --sudo -r "role[x]"`
错误:
[2014-12-31T12:07:53+00:00] ERROR: Connection refused connecting to https://chefserver.dsh.com/organizations/digital/clients, retry 1/5`
日志显示:
Chef encountered an error attempting to create the client "ip-10-x-x-x.ec2.internal"`
到目前为止,我已经厌倦了:
现在我得到了不同的错误:
Original Exception: OpenSSL::SSL::SSLError: hostname "10.x.x.x" does not match the server certificate`
答案 0 :(得分:3)
SSL证书中的主机名与您使用的IP地址不匹配。
chefserver.dsh.com 是否已解析为该实例的IP地址?
答案 1 :(得分:2)
在Chef服务器上:
https://IPAddress
在Chef WorkStation上:
https://IPAddress:443/organizations/name
答案 2 :(得分:0)
当我遇到相同的错误时,我发现以下步骤对AWS上的多个实例非常有用。通过这些步骤,您不必基于ipaddress来重新配置服务器。
在AWS上,有时您会看到ip-10-x-x-x之类的内容作为公共主机名,而没有ec2.internal部分(来自元数据端点)。在这种情况下,您只需在工作站上添加条目
ipaddress ip-10-x-x-x
到本地/ etc / hosts。
这将允许对https://ip-10-x-x-x/organizations(您的厨师服务器URL)的DNS调用被路由到该ipaddress(以防您的直接DNS路由不起作用),并允许进行SSL握手,以使刀工作从本地开始,而无需使用ipaddress重新配置您的Chef服务器