2015-01-08 20 views
6

我已經安裝了廚師客戶12.0.3,在它的上面我已經安裝廚師-DK版0.3.5但爲什麼廚師-DK被安裝廚師客戶端版本Chef: 11.18.0.rc.1我已經安裝了廚師-DK和使用berkshelf但伯克斯已開始上傳失敗

  1. 無法上傳食譜的廚師長服務器
  2. 伯克斯貨架名單是工作,但伯克斯上傳失敗

錯誤:

E, [2015-01-08T04:58:36.707534 #22533] ERROR -- : Ridley::Errors::ClientError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed 
E, [2015-01-08T04:58:36.708931 #22533] ERROR -- : /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/responses.rb:29:in `value' 
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value' 
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing' 
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_ 

    There was an error connecting to the Chef Server 

回答

3

SSL驗證過程失敗。按照these instructions將其固定在刀上。對於berkshelf,您可以在您的config.json中禁用SSL驗證,或者您可以將$SSL_CERT_FILE設置爲下載的服務器證書。

+1

忽略〜/ .berkshelf/config.json設置(或HOME%/ .berkshelf/config.json) '{「ssl」:{「verify」:false}}' – KCD

1

正如我固定的錯誤,而不是固定在這裏的症狀的大風扇是你可以做什麼,以確保SSL連接與驗證工作(有更詳細一點比coderanger一個):

1)獲取服務器證書,並將其添加到廚師-DK的cacert.pem文件

openssl s_client -showcerts -connect <YOUR_CHEF_SERVER>:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >> /opt/chefdk/embedded/ssl/certs/cacert.pem

2)設置SSL庫的ENV變量:

export SSL_CERT_FILE=/opt/chefdk/embedded/ssl/certs/cacert.pem

重試上傳,它應該工作。

2

這是一個berks相關的問題。
您可以取消SSL驗證伯克斯選項的配置文件:

echo '{"ssl": { "verify": false }}' > ~/.berkshelf/config.json 
+0

感謝分享。爲我做了這份工作 –

0

您還可以禁用SSL在命令行上檢查:

berks upload --no-ssl-verify 
相關問題