Chef infra 无法从工作层运行chef客户端
我在AmazonEC2上有一个windows工作站和一个节点。我能够引导amazon节点。现在我想在我的工作层上运行Chef infra 无法从工作层运行chef客户端,chef-infra,Chef Infra,我在AmazonEC2上有一个windows工作站和一个节点。我能够引导amazon节点。现在我想在我的工作层上运行chef-client厨师客户端抛出“未找到私钥”错误 我能够运行刀客户端列表或节点列表,这证明我的工作站的网络没有问题。任何帮助此方法仅适用于工作站和节点都是Windows计算机的情况。在两台计算机上安装Winrm。并尝试运行以下命令 刀子winrm名称:NodeName“chef client”-x服务器用户名-p“密码”-一个IP地址 例如 刀子winrm名称:节点1“厨师客
chef-client
<代码>厨师客户端抛出“未找到私钥”错误
我能够运行
刀客户端列表
或节点列表
,这证明我的工作站的网络没有问题。任何帮助此方法仅适用于工作站和节点都是Windows计算机的情况。在两台计算机上安装Winrm。并尝试运行以下命令
刀子winrm名称:NodeName“chef client”-x服务器用户名-p“密码”-一个IP地址
例如
刀子winrm名称:节点1“厨师客户端”-x管理员-p”pass@123“-IP地址
好的,我今天在ubuntu机器上运行时遇到了同样的问题。同样的东西在另一个centos节点上工作 问题是我的用户在节点上运行chef client时没有正确的访问权限 一旦我使用root用户登录,一切都很顺利
:)但是如果您可以运行
刀客户端列表
,那么您已经拥有客户端证书,不再需要注册(这就是您需要验证.pem
的原因)。检查您的.chef/knife.rb
(在您的repo中),将设置客户密钥指向的位置。应该有你的客户证书。如果不存在这样的设置。在Chef admin界面中为您创建一个新客户端,并将证书放置在.Chef/client.pem
中,然后将客户端密钥指向该文件。我无法从工作站运行Chef客户端。它抛出上面文章中提到的“私钥未找到”错误,而不复制validation.pem。Knife.rb client_key指向的文件是repo目录“Knife.rb client_key指向的文件是repo目录”是什么意思?啊。。我猜你把一些事情搞混了。。因此,knife
可以工作,但是chef client
在您的工作站上不能工作。我会说那很好,除非你想提供你的工作站。如果要执行此操作,还必须将/etc/chef/client.rb
指向私钥。是否尝试按照此处的调试说明进行调试:?以确保我们处于同一页面上。我想将我的工作站用作节点。我没有在工作站(windows)上启动SSH服务的权限。所以引导不会起作用。我创建了client.rb并添加了https\u代理、chef\u服务器\u url、验证\u键值。我发现你的钥匙指向Organization-validator.pem。通过这些设置,我取得了一些进展。我没有“网络错误”。现在,它正在尝试创建客户端,但由于401错误而失败。我尝试了新的组织验证器,但没有成功。
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!
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)