通过我们的厨师安装(12.0.3),我们从内部专用CA安装了新的SSL证书。然而,一旦我们安装了证书,我们现在试图引导新节点时,遇到下列错误,例如:使用自定义SSL证书引导厨师节点
C:\ws\devops\chef\cookbooks>knife bootstrap windows winrm WIN-e9073a7mffd.mydomain.local -N CHEF_TEST_DELETE_ME -x administrator -P password -r "recipe[test]"
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:14+00:00] INFO: *** Chef 12.0.3 ***
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:14+00:00] INFO: Chef-client pid: 1644
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:21+00:00] INFO: Client key c:/chef/client.pem is not present - registering
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:21+00:00] ERROR: SSL Validation failure connecting to host: chef.mydomain.local - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
WIN-e9073a7mffd.mydomain.local
WIN-e9073a7mffd.mydomain.local ================================================================================
WIN-e9073a7mffd.mydomain.local Chef encountered an error attempting to create the client "CHEF_TEST_DELETE_ME"
WIN-e9073a7mffd.mydomain.local ================================================================================
WIN-e9073a7mffd.mydomain.local
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:21+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
WIN-e9073a7mffd.mydomain.local [2015-02-11T17:45:21+00:00] FATAL: NoMethodError: undefined method `run_id' for nil:NilClass
ERROR: Failed to execute command on WIN-e9073a7mffd.mydomain.local return code 1
如果我手动添加证书,为我们的CA为/opscode/chef/embedded/ssl/certs/cacert.pem
文件,则服务器将允许后续引导尝试。
有关如何解决这个问题的任何想法,以便在第一次尝试时正确引导节点?
我有放置在工作站的trusted_certs目录中的CA和Chef服务器的证书文件,但是在启动时,这些证书不会被复制到客户端。我将尝试设置ssl_verify_mode以查看这是否能解决问题,但说实话,似乎更多的是黑客攻击,因为必须在每个工作站上设置模式。如果可能,我更喜欢一次性修复。 – dthagard 2015-02-12 13:47:22
如果还没有一个,可以在github上购买一张票。 – Tensibai 2015-02-12 13:49:43
要清楚,即使手动将文件手动复制到客户端也不起作用。如果我执行'ssl fetch https://chef.mydomain.local'并手动安装CA证书,那么后续运行'knife ssl check https://chef.mydomain.local'会传递。但是,来自工作站的bootstrap命令仍然失败,并显示'错误:连接到主机的SSL验证失败:chef.mydomain.local - SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败'我将添加根据您的建议GitHub的机票。谢谢您的帮助! – dthagard 2015-02-12 13:54:45