2014-11-24 50 views
11

我重新創建了一個具有相同名稱的節點。我遇到了這個錯誤,設置了一個節點並引導它:廚師引導時出錯。授權錯誤:(HTTP 403)

Starting Chef Client, version 11.16.4 
[2014-11-24T18:51:13+00:00] INFO: *** Chef 11.16.4 *** 
[2014-11-24T18:51:13+00:00] INFO: Chef-client pid: 4540 
Creating a new client identity for node1 using the validator key. 
[2014-11-24T18:51:15+00:00] INFO: Client key /etc/chef/client.pem is not present - registering 
[2014-11-24T18:51:16+00:00] INFO: HTTP Request Returned 409 Conflict: Client already exists 
[2014-11-24T18:51:16+00:00] INFO: HTTP Request Returned 403 Forbidden: error 

================================================================================ 
Chef encountered an error attempting to create the client "node1" 
================================================================================ 


Authorization Error: 
-------------------- 
Your validation client is not authorized to create the client for this node (HTTP 403). 



Possible Causes: 
---------------- 
* There may already be a client named "node1" 

* Your validation client (chef-validator) may have misconfigured authorization permissions. 

回答

27

在這種情況下,我沒有刪除客戶端。節點重新創建時使用相同的名稱,因此節點和客戶端都需要刪除。以下是執行此操作的命令。

knife node delete <node-name> 
knife client delete <node-name> 

在上述情況下它必須是:

knife node delete node1 
knife client delete node1 
+0

我跑的命令,但我得到了一個警告說「找不到刀配置文件」。所以我把目錄改成了/ etc/chef,在那裏我用了knife.rb,它解決了我的問題。 – 2017-05-22 07:22:39