gpt4 book ai didi

chef-infra - 无法从工作站运行 Chef 客户端

转载 作者:行者123 更新时间:2023-12-04 11:47:45 24 4
gpt4 key购买 nike

我在 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 listnode list这证明我的工作站没有网络问题。任何帮助表示赞赏

最佳答案

此方法仅适用于工作站和节点均为 Windows 计算机的情况。在两台机器上安装 Winrm。并尝试运行以下命令。

knife winrm name:NodeName "chef-client" -x ServerUsername -P "password" -a ipaddress



例如。

knife winrm name:node1 "chef-client" -x administrator -P "pass@123" -a ipaddress

关于chef-infra - 无法从工作站运行 Chef 客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21031902/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com