我在AMAZON EC2上有一个Windows工作站和一个节点。我能够引导亚马逊节点。现在我想在我的工作中运行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
,这证明我的工作站没有网络问题。任何帮助表示赞赏
答案 0 :(得分:0)
仅当Workstation和节点都是Windows计算机时,此方法才适用。在两台机器上安装Winrm。并尝试运行以下命令。
knife winrm name:NodeName&#34; chef-client&#34; -x ServerUsername -P&#34;密码&#34; -a ipaddress
例如
knife winrm name:node1&#34; chef-client&#34; -x administrator -P&#34;传递@ 123&#34; -a ipaddress
答案 1 :(得分:0)
好吧,今天我在ubuntu机器上运行时遇到了同样的问题。同一件事在另一个centos节点上也起作用。
我的用户在节点上运行Chef-client时没有适当的访问权限。
一旦我以root用户身份登录,一切都会顺利进行。
:)