2015-04-02 55 views
1

我需要我的厨师的服务器上更改默认attibute validation_client_name我ORGNAME验证器,因为它使一个错误,而的Bootstrap我的节点:更改默认validation_client_name为“ORGNAME验证器”

Chef encountered an error attempting to create the client "mynode-1" 

Authentication Error: 
--------------------- 
Failed to authenticate to the chef server (http 401). 

Server Response: 
---------------- 
Invalid signature for user or client 'chef-validator' 

Relevant Config Settings: 
------------------------- 
chef_server_url   "https://chef.myorgname.com/organizations/orgname" 
validation_client_name "chef-validator" 
validation_key   "/etc/chef/validation.pem" 

If these settings are correct, your validation_key may be invalid. 

[2015-04-02T15:30:44+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
Chef Client failed. 0 resources updated in 1.426514217 seconds 
[2015-04-02T15:30:44+00:00] ERROR: 401 "Unauthorized" 
[2015-04-02T15:30:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) 

我该怎么做?

厨师,服务器12

回答

1

您可以在任何时间,通过厨师服务器web界面,请重置您的钥匙。一个弹出框会显示你可以剪切/粘贴到你的validation.pem文件中的新密钥。

此外,我很确定你错过了一个client_key,但可能不是这样。您是否尝试过下载Chef服务器Web界面默认的入门工具包?它配备了所有这些预先烘焙的东西。

+0

如果我手动将client.rb配置更改为'validation_client_name'orgname-validator“',然后启动chef-client,它会在我的主服务器上创建一个节点和客户端,并且一切正常。 make'validation_client_name“orgname-validator”'一个默认配置用于自举? – 2015-04-06 13:38:03

+0

@Blasterdick请发布client.rb和knife.rb – 2015-04-07 14:27:37

+0

使用我的client.rb&knife.rb我可以管理节点/客户端/食谱/等,但是当我引导新节点时,厨师将“validation_client_name”设置为“chef-验证器“,然后节点从厨师服务器获得401错误。 – 2015-04-09 12:38:46