Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having some troubles with new windows node deployments. The chef-client fails with this error

I want to solve this, but i don't know were to find errors which can help me to solve this.


Stacktrace output from c:/chef/cache/chef-stacktrace.out:

Generated at 2014-05-09 10:37:19 +0000
EOFError: end of file reached
C:/opscode/chef/embedded/lib/ruby/1.9.1/openssl/buffering.rb:174:in `sysread_nonblock'
C:/opscode/chef/embedded/lib/ruby/1.9.1/openssl/buffering.rb:174:in `read_nonblock'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141:in `rbuf_fill'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:2563:in `read_status_line'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:2552:in `read_new'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1320:in `block in transport_request'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1294:in `request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1287:in `block in request'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:746:in `start'
C:/opscode/chef/embedded/lib/ruby/1.9.1/net/http.rb:1285:in `request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/http/basic_client.rb:65:in `request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/http.rb:257:in `block in send_http_request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/http.rb:289:in `retrying_http_errors'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/http.rb:251:in `send_http_request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/http.rb:141:in `request'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/rest.rb:115:in `get'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/node.rb:507:in `load'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/node.rb:491:in `find_or_create'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/policy_builder/expand_node_object.rb:92:in `load_node'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:249:in `load_node'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:418:in `do_run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/client.rb:227:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application.rb:217:in `run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:328:in `block in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:317:in `loop'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application/client.rb:317:in `run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/lib/chef/application.rb:67:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4-x86-mingw32/bin/chef-client:26:in `<top (required)>'
C:/opscode/chef/bin/chef-client:23:in `load'
C:/opscode/chef/bin/chef-client:23:in `<main>

This is my chef-client output.

PS C:\Users\Administrator> chef-client
[2014-05-09T10:42:42+00:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle

To fix this issue add an entry like this to your configuration file:

  # Verify all HTTPS connections (recommended)
  ssl_verify_mode :verify_peer

  # OR, Verify only connections to chef-server
  verify_api_cert true

To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:

  knife ssl check -c C:\chef\client.rb

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Starting Chef Client, version 11.12.4
[2014-05-09T10:42:45+00:00] INFO: *** Chef 11.12.4 ***
[2014-05-09T10:42:45+00:00] INFO: Chef-client pid: 1048

Chef encountered an error attempting to load the node data for "mynode"

Unexpected Error:
EOFError: end of file reached

[2014-05-09T10:42:54+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 11.232079 seconds
[2014-05-09T10:42:54+00:00] FATAL: EOFError: end of file reached
PS C:\Users\Administrator>

And this is the output of the knife rackspace create server output:

localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 1" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 2" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 3" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 4" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 5" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 6" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 7" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 8" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 9" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 10" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 11" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 12" 
localhost "Rendering "C:\Users\ADMINI~1\AppData\Local\Temp\bootstrap-7917-1399629922.bat" chunk 13" 
localhost Checking for existing directory "C:\chef"...
localhost Existing directory not found, creating.
localhost C:\Users\Administrator>(
localhost echo.url = WScript.Arguments.Named("url")  
localhost  echo.path = WScript.Arguments.Named("path")  
localhost  echo.proxy = null  
localhost  echo.Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")  
localhost  echo.Set wshShell = CreateObject( "WScript.Shell" )  
localhost  echo.Set objUserVariables = wshShell.Environment("USER")  
localhost  echo. 
localhost  echo.rem http proxy is optional  
localhost  echo.rem attempt to read from HTTP_PROXY env var first  
localhost  echo.On Error Resume Next  
localhost  echo. 
localhost  echo.If NOT (objUserVariables("HTTP_PROXY") = "") Then  
localhost  echo.proxy = objUserVariables("HTTP_PROXY")  
localhost  echo. 
localhost  echo.rem fall back to named arg  
localhost  echo.ElseIf NOT (WScript.Arguments.Named("proxy") = "") Then  
localhost  echo.proxy = WScript.Arguments.Named("proxy")  
localhost  echo.End If  
localhost  echo. 
localhost  echo.If NOT isNull(proxy) Then  
localhost  echo.rem setProxy method is only available on ServerXMLHTTP 6.0+  
localhost  echo.Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")  
localhost  echo.objXMLHTTP.setProxy 2, proxy  
localhost  echo.End If  
localhost  echo. 
localhost  echo.On Error Goto 0  
localhost  echo. 
localhost "GET", url, false  
localhost  echo.objXMLHTTP.send() 
localhost  echo.If objXMLHTTP.Status = 200 Then  
localhost  echo.Set objADOStream = CreateObject("ADODB.Stream")  
localhost  echo.objADOStream.Open 
localhost  echo.objADOStream.Type = 1  
localhost  echo.objADOStream.Write objXMLHTTP.ResponseBody  
localhost  echo.objADOStream.Position = 0  
localhost  echo.Set objFSO = Createobject("Scripting.FileSystemObject")  
localhost  echo.If objFSO.Fileexists(path) Then objFSO.DeleteFile path  
localhost  echo.Set objFSO = Nothing  
localhost  echo.objADOStream.SaveToFile path  
localhost  echo.objADOStream.Close 
localhost  echo.Set objADOStream = Nothing  
localhost  echo.End if  
localhost  echo.Set objXMLHTTP = Nothing 
localhost ) 1>C:\chef\wget.vbs 
localhost C:\Users\Administrator>(
localhost echo.param( 
localhost  echo.   [String] $remoteUrl,  
localhost  echo.   [String] $localPath  
localhost  echo.) 
localhost  echo. 
localhost  echo.$webClient = new-object System.Net.WebClient;  
localhost  echo. 
localhost  echo.$webClient.DownloadFile($remoteUrl, $localPath); 
localhost ) 1>C:\chef\wget.ps1 
localhost C:\Users\Administrator>(
localhost ) 
localhost Detected Windows Version 6.2 Build 9200
localhost C:\Users\Administrator>goto Version6.2 
localhost C:\Users\Administrator>goto architecture_select 
localhost C:\Users\Administrator>goto Architecture 
localhost C:\Users\Administrator>goto ArchitectureAMD64 
localhost C:\Users\Administrator>goto install 
localhost Checking for existing downloaded package at "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi"
localhost No existing downloaded packages to delete.
localhost Attempting to download client package using cscript...
localhost C:\Users\Administrator>cscript /nologo C:\chef\wget.vbs /url:"" /path:"C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi" 
localhost Download via cscript succeeded.
localhost Installing downloaded client package...
localhost C:\Users\Administrator>msiexec /qn /log "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-msi23498.log" /i "C:\Users\ADMINI~1\AppData\Local\Temp\chef-client-latest.msi" 
localhost Installation completed successfully
localhost Writing validation key...
localhost Validation key written.
localhost C:\Users\Administrator>mkdir C:\chef\ohai\hints 
localhost C:\Users\Administrator>(echo.{}) 1>C:\chef\ohai\hints\rackspace.json 
localhost C:\Users\Administrator>(
localhost echo.log_level        :info  
localhost  echo.log_location     STDOUT  
localhost  echo. 
localhost  echo.chef_server_url  ""  
localhost  echo.validation_client_name "chef-validator"  
localhost  echo.client_key        "c:/chef/client.pem"  
localhost  echo.validation_key    "c:/chef/validation.pem"  
localhost  echo. 
localhost  echo.file_cache_path   "c:/chef/cache"  
localhost  echo.file_backup_path  "c:/chef/backup"  
localhost  echo.cache_options     ({:path => "c:/chef/cache/checksums", :skip_expires => true})  
localhost  echo. 
localhost  echo.node_name "mynode" 
localhost ) 1>C:\chef\client.rb 
localhost C:\Users\Administrator>(echo.{"run_list":["role[windows]"]}) 1>C:\chef\first-boot.json 
localhost Starting chef to bootstrap the node...
localhost C:\Users\Administrator>SET "PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ruby\bin;C:\opscode\chef\bin;C:\opscode\chef\embedded\bin" 
localhost C:\Users\Administrator>chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json -E _default 
localhost [2014-05-09T10:06:37+00:00] WARN: 
localhost * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
localhost SSL validation of HTTPS requests is disabled. HTTPS connections are still
localhost encrypted, but chef is not able to detect forged replies or man in the middle
localhost attacks.
localhost To fix this issue add an entry like this to your configuration file:
localhost ```
localhost   # Verify all HTTPS connections (recommended)
localhost   ssl_verify_mode :verify_peer
localhost   # OR, Verify only connections to chef-server
localhost   verify_api_cert true
localhost ```
localhost To check your SSL configuration, or troubleshoot errors, you can use the
localhost `knife ssl check` command like so:
localhost ```
localhost   knife ssl check -c c:/chef/client.rb
localhost ```
localhost * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
localhost [2014-05-09T10:06:39+00:00] INFO: *** Chef 11.12.4 ***
localhost [2014-05-09T10:06:39+00:00] INFO: Chef-client pid: 1408
localhost [2014-05-09T10:07:14+00:00] INFO: Client key c:/chef/client.pem is not present - registering
localhost [2014-05-09T10:07:15+00:00] INFO: HTTP Request Returned 404 Object Not Found: error
localhost [2014-05-09T10:07:15+00:00] INFO: Setting the run_list to ["role[windows]"] from CLI options
localhost [2014-05-09T10:07:15+00:00] INFO: Run List is [role[windows]]
localhost [2014-05-09T10:07:15+00:00] INFO: Run List expands to [newrelic::server-monitor-agent, ms_dotnet45, powershell]
localhost [2014-05-09T10:07:15+00:00] INFO: Starting Chef Run for mynode
localhost [2014-05-09T10:07:15+00:00] INFO: Running start handlers
localhost [2014-05-09T10:07:15+00:00] INFO: Start handlers complete.
localhost [2014-05-09T10:07:15+00:00] INFO: HTTP Request Returned 404 Object Not Found: 
localhost ================================================================================
localhost Error Resolving Cookbooks for Run List:
localhost ================================================================================
localhost Unexpected Error:
localhost -----------------
localhost EOFError: end of file reached
localhost [2014-05-09T10:07:15+00:00] ERROR: Running exception handlers
localhost [2014-05-09T10:07:15+00:00] ERROR: Exception handlers complete
localhost [2014-05-09T10:07:15+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
localhost [2014-05-09T10:07:15+00:00] FATAL: EOFError: end of file reached
share|improve this question
up vote 1 down vote accepted

Follow these steps:

1- Remove the node and the client for that node from your chef server.

2- Re install the chef client using bootstrap from your workstation

knife bootstrap windows winrm server_ip -x Administrator -P server_pass -N server_name

Do not add any role, just run from the command prompt to check if its working correctly:


The chef client configuration its named client.rb in that file you MUST have the line:

node_name "server_name"

That should work as you have exactly the same problem that i had a few weeks ago. This is because OHAI gets crazy pulling the node name.

share|improve this answer

The server is closing the connection before it sends even the first line of the HTTP response. So I'm going to check firewall rules.

share|improve this answer
Did you ever solve this? I have the same issue. – Code Silverback Aug 14 '14 at 23:45
Yes @CodeSilverback please read the answer. – ccamacho Aug 19 '14 at 6:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.