5
我有一个Windows工作站和AMAZON EC2上的节点。我能够引导亚马逊节点。现在我想在我的工作站上运行chef-client
。 chef-client
正在抛出“未找到私钥”错误。无法从工作站运行厨师客户端
C:\chef-repo>chef-client
Starting Chef Client, version 11.8.0
[2014-01-09T15:24:52-06:00] WARN: unable to detect ip6address
Creating a new client identity for XXXXXX.ent.ad.xxxx.com using the validator key.
[2014-01-09T15:25:03-06:00] WARN: Failed to read the private key C:\chef\validation.pem: #<Errno::ENOENT: No such file or director
y - C:\chef\validation.pem>
================================================================================
Chef encountered an error attempting to create the client "XXXXXX.ent.ad.xxxx.com"
================================================================================
Private Key Not Found:
----------------------
Your private key could not be loaded. If the key file exists, ensure that it is
readable by chef-client.
Relevant Config Settings:
-------------------------
validation_key "C:\chef\validation.pem"
[2014-01-09T15:25:03-06:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated
[2014-01-09T15:25:03-06:00] FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read C:\chef\validation.pem, which you told me to
use to sign requests!
我复制validation.pem
从亚马逊EC2节点到c:\chef
解决错误。现在,它引发以下错误
C:\chef-repo>chef-client
Starting Chef Client, version 11.8.0
[2014-01-09T15:28:39-06:00] WARN: unable to detect ip6address
Creating a new client identity for XXXXX.ent.ad.xxxx.com using the validator key.
================================================================================
Chef encountered an error attempting to create the client "XXXXXX.ent.ad.xxxx.com"
================================================================================
Network Error:
--------------
There was a network error connecting to the Chef Server:
Error connecting to https://api.opscode.com/organizations/satishtest/clients - A connection attempt failed because the connected p
arty did not properly respond after a period of time, or established connection failed because connected host has failed to respon
d. - connect(2)
If your chef_server_url is correct, your network could be down.
[2014-01-09T15:29:15-06:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated
- A connection attempt failed because the connected party did not properly respond after a period of time, or established connecti
on failed because connected host has failed to respond. - connect(2)
我能够运行knife client list
或node list
这证明有是从我的工作站的网络没有问题。任何帮助赞赏
但是,如果你可以运行'刀客户list',那么你已经有了一个客户端证书,并且不需要再注册(这就是你需要的'validation.pem')。 检查你的'.chef/knife.rb'(在你的回购),到'client_key'指向的地方。应该有你的客户证书。如果不存在这样的设置。在Chef admin界面中为您创建一个新客户端,并将证书放置在在'.chef/client.pem'中指向该文件的'client_key'。 – StephenKing
我无法从工作站运行chef-client。它会抛出上面提到的帖子中提到的“未找到私钥”错误,而不复制validation.pem。 Knife.rb client_key指向一个文件是repo目录 – user911
你的意思是“Knife.rb client_key指向一个文件是repo目录”?啊..我想你混淆了一些东西..所以'刀子'工作,但'厨师客户端'不在你的工作站上。我会说这很好,除非你想配置你的工作站。如果你想这样做,你必须将'/ etc/chef/client.rb'指向私钥。 – StephenKing