2015-11-18 40 views
0

運行時與廚師的客戶端菜譜,運行失敗,此錯誤: 的EOFError:到達文件結尾廚師客戶端運行失敗,並引發EOFError同步食譜:到達文件結尾

我是相當新對此,我不知道這是什麼意思。食譜是社區食譜的一個非常簡單的包裝,應該很好。 https://supermarket.chef.io/cookbooks/powershell

這裏的錯誤再次:

Synchronizing Cookbooks: 
    - windows (1.37.0) 
    - ms_dotnet2 (0.0.0) 
    - ms_dotnet45 (0.0.0) 
    - powershell (3.1.0) 
    - chef_handler (1.1.8) 
    - ewe-powershell (0.1.0) 

    ================================================================================ 
    Error Syncing Cookbooks: 
    ================================================================================ 

    Unexpected Error: 
    ----------------- 
    EOFError: end of file reached 


    Running handlers: 
[2015-11-18T08:30:15-08:00] ERROR: Running exception handlers 
    Running handlers complete 
[2015-11-18T08:30:15-08:00] ERROR: Exception handlers complete 
    Chef Client failed. 0 resources updated in 24 seconds 
[2015-11-18T08:30:15-08:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out 
[2015-11-18T08:30:15-08:00] FATAL: EOFError: end of file reached 

C:\WINDOWS\system32> 

和這裏的堆棧跟蹤:

Generated at 2015-11-18 08:30:15 -0800 
EOFError: end of file reached 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/protocol.rb:153:in `rbuf_fill' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/protocol.rb:144:in `readline' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http/response.rb:39:in `read_status_line' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http/response.rb:28:in `read_new' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1412:in `block in transport_request' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1409:in `catch' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1409:in `transport_request' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1382:in `request' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1375:in `block in request' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:852:in `start' 
C:/opscode/chef/embedded/lib/ruby/2.0.0/net/http.rb:1373:in `request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http/basic_client.rb:65:in `request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:264:in `block in send_http_request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:298:in `block in retrying_http_errors' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:296:in `loop' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:296:in `retrying_http_errors' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:260:in `send_http_request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/http.rb:170:in `streaming_request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/rest.rb:180:in `streaming_request' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/rest.rb:118:in `get' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/cookbook/synchronizer.rb:277:in `download_file' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/cookbook/synchronizer.rb:254:in `sync_file' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/cookbook/synchronizer.rb:152:in `block (2 levels) in sync_cookbooks' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/util/threaded_job_queue.rb:52:in `call' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/util/threaded_job_queue.rb:52:in `block (3 levels) in process' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/util/threaded_job_queue.rb:50:in `loop' 
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.5.1-universal-mingw32/lib/chef/util/threaded_job_queue.rb:50:in `block (2 levels) in process' 

這是否意味着有一些的EOFError在protocol.rb? 但是這是社區食譜的一部分,我認爲這看起來很穩固。

回答

0

當廚師客戶端啓動時,它需要做的一件事就是下載它將用於運行的食譜代碼。這是緩存本地加速未來運行,但第一次或當文件更改等等。這個例外是說,它試圖從服務器上下載ewe-powershell食譜失敗。這可能意味着它在上傳過程中被損壞。快速首先檢查一下knife cookbook delete,然後重新上傳。如果失敗了,我會開始嘗試找出哪些文件無法下載。如果你打開廚師的日誌級別(-l debug),你應該看到它試圖獲取哪個URL,這將告訴你哪個文件失敗。有了這個,直接從Bookshelf(與Chef Server一起處理文件上傳和下載的服務)直接嘗試它。

+0

刪除食譜,重新輸入不是由廚師生成的部分,然後重新上傳食譜。它現在運行。我懷疑這個錯誤與在windows上開發部分食譜有關,部分在Mac上。 – Johnny5

0

這些是由於網絡錯誤。它們不是客戶端錯誤,無法通過刪除和重新上傳菜譜來修復。

這裏有一些信息的要點我做:

https://gist.github.com/lamont-granquist/e25af8f50cb4ae4f8050

而且更多信息:

https://discourse.chef.io/t/eoferror-when-decrypting-data-bags/5716/2 https://github.com/chef/chef/issues/1881

EOFErrors已經找到了破碎的代理,PMTU問題( VPN或過濾ICMP dest不可達),巨型幀,網絡驅動程序/硬件中的錯誤TCP卸載,Xen錯誤等。

如果使用足夠大的數據包,您應該能夠在命令行上覆制問題。

ping chef.example.com -f -l 9999 

您也可以在Unix系統中發送大量的ping包或大的GET請求:

ping -s 9999 chef.example.com 
curl http://chef.example.com/`printf '%*s' 9999 '' | tr ' ' 'a'` 
如果你的廚師服務器chef.example.com那麼你可以使用Windows發送大量ping包

類似的方法可以幫助完全在任何廚師相關軟件之外複製問題並顯示其網絡。最終的解決方案將不得不花費時間來調試底層網絡問題。在這種情況下,這聽起來像是網絡神奇地固定了自己。(並且記住「網絡」我在任何一端都包括主機TCP堆棧和網絡驅動程序,包括網絡通信必須經過的任何虛擬化技術 - 「廣泛的意義上的網絡」。 )