2014-02-12 195 views
3

我已經設置了一個基本的Chef基礎設施,其中包含一個工作站,一個託管的Chef Server和一個Ubuntu服務器作爲節點。我在我的工作場所使用此設置,因此互聯網連接需要代理。我在knife.rb和Ubuntu服務器中都進行了必要的代理設置。工作站和節點都正確連接到互聯網。 這裏的問題 - 當我嘗試引導使用knife,我得到以下錯誤的節點:無法使用廚師引導節點

<My Node's IP> --2014-02-12 10:29:05-- https://www.opscode.com/chef/install.sh 
<My Node's IP> Resolving www.opscode.com (www.opscode.com)... 184.106.28.91 
<My Node's IP> Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... failed: Connection refused. 
<My Node's IP> bash: line 83: chef-client: command not found 

請注意,我用下面的命令來引導節點 -

knife bootstrap <My Node's IP> --sudo -x <username> -P <password> -N <name> 

你能請在這件事上給予我幫助? 在此先感謝。

回答

4

經過很長時間的努力,終於找到了答案。 knife.rb bootstrap-proxy的另一個條目也必須創建。

knife[:bootstrap_proxy] = "http://username:[email protected]:port" 

這樣做後,運行以下命令引導 -

knife bootstrap <My Node's IP> --sudo -x <username> -P <password> -N <name> 

這爲我工作!

0

我遇到了同樣的問題。你只需要輸入一些額外的命令相同的東西:

knife bootstrap <My Node's IP> --sudo -x <username> -P <password> -N <name> --bootstrap-wget-options --no-check-certificate 

它會一直工作。

0

在我的情況下,我沒有在客戶端的主機文件條目中添加服務器。例如, 我得到這個錯誤「連接被拒絕 - 連接被拒絕連接到https://server.com/organizations/sample/nodes/node1」 我簡單地在「/ etc/hosts」文件中用我的服務器的IP和名稱(即「server.com」)做了一個條目,它對我很有用。

VI/etc/hosts中

192.168.159.100 server.com