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