EOFError when downloading cookbooks with knife


#1

Hi all,

I encounter a problem with my chef instance whenever I want to download
a cookbook with knife. Uploading works fine. The output is as follows:

node31:~ # knife cookbook download --force squid 0.0.2 -VV
DEBUG: Using configuration from /root/.chef/knife.rb
Downloading squid cookbook version 0.0.2
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/squid/0.0.2
Downloading resources
Downloading providers
Downloading recipes
DEBUG: Downloading recipes/default.rb to
/root/squid-0.0.2/recipes/default.rb
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/9adef92f95e62edfb089a1e12a28492b
DEBUG: Streaming download from
http://node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/9adef92f95e62edfb089a1e12a28492b
to tempfile /tmp/chef-rest20120907-15717-gt0xev
Downloading definitions
Downloading libraries
Downloading attributes
Downloading files
DEBUG: Downloading files/default/addedfile to
/root/squid-0.0.2/files/default/addedfile
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/b8de890b15153b8427474de0001972e3
DEBUG: Streaming download from
http://node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/b8de890b15153b8427474de0001972e3
to tempfile /tmp/chef-rest20120907-15717-m37c2k
Downloading templates
Downloading root_files
DEBUG: Downloading README.md to /root/squid-0.0.2/README.md
DEBUG: Signing the request as bob
DEBUG: Sending HTTP Request via GET to
node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/6e21094b7a920e374e7261f50e9c4eef
/usr/lib64/ruby/1.9.1/net/protocol.rb:141:in read_nonblock': end of file reached (EOFError) from /usr/lib64/ruby/1.9.1/net/protocol.rb:141:inrbuf_fill’
from /usr/lib64/ruby/1.9.1/net/protocol.rb:122:in readuntil' from /usr/lib64/ruby/1.9.1/net/protocol.rb:132:inreadline’
from /usr/lib64/ruby/1.9.1/net/http.rb:2562:in read_status_line' from /usr/lib64/ruby/1.9.1/net/http.rb:2551:inread_new’
from /usr/lib64/ruby/1.9.1/net/http.rb:1319:in block in transport_request' from /usr/lib64/ruby/1.9.1/net/http.rb:1316:incatch’
from /usr/lib64/ruby/1.9.1/net/http.rb:1316:in transport_request' from /usr/lib64/ruby/1.9.1/net/http.rb:1293:inrequest’
from /usr/lib64/ruby/1.9.1/net/http.rb:1286:in block in request' from /usr/lib64/ruby/1.9.1/net/http.rb:745:instart’
from /usr/lib64/ruby/1.9.1/net/http.rb:1284:in request' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:99:inblock in call’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:114:in
hide_net_http_bug' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest/rest_request.rb:98:incall’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:299:in
block in streaming_request' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:334:inretriable_rest_request’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:297:in
streaming_request' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:128:inget_rest’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:90:in
block (2 levels) in run' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:85:ineach’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:85:in
block in run' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:82:ineach’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife/cookbook_download.rb:82:in
run' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife.rb:402:inrun_with_pretty_exceptions’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/knife.rb:168:in run' from /usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/knife.rb:123:inrun’
from
/usr/lib64/ruby/gems/1.9.1/gems/chef-10.12.0/bin/knife:25:in <top (required)>' from /usr/bin/knife:23:inload’
from /usr/bin/knife:23:in `’

The Chef server log can be seen here:
http://pastebin.com/TqDpna8y

CouchDb is running and the logs show nothing suspicious:
http://pastebin.com/QSiA1AVL

The same error happens when I try to run chef-client on a client while
trying to download a cookbook. Again, uploading cookbooks works fine. Al
this happens on the node that also hosts the chef server.

Any ideas what’s going wrong? Where should I look for errors?
Thanks in advance.

Regards,
Nanuk Krinner


#2

On 07/09/2012, at 9:38 PM, Nanuk Krinner nanukkrinner@googlemail.com wrote:

I encounter a problem with my chef instance whenever I want to download a cookbook with knife. Uploading works fine. The output is as follows:

DEBUG: Sending HTTP Request via GET to node31.cluster.xs:4000/cookbooks/squid/0.0.2/files/6e21094b7a920e374e7261f50e9c4eef
/usr/lib64/ruby/1.9.1/net/protocol.rb:141:in `read_nonblock’: end of file reached (EOFError)

I’d try upgrading your Ruby to 1.9.3 (you’re on 1.9.1). Examples of this error I was able to find with Google (including this Chef bug: http://tickets.opscode.com/browse/CHEF-2363) were generally traced to bugs in Ruby and/or OpenSSL.


Kevin Yank
Chief Technology Officer, Avalanche Technology Group / AVG (AU/NZ) Pty Ltd

2/101 Tulip Street, Sandringham Victoria 3191 Australia
ph: +61 3 9581 0806


#3

Hi,

On 09/07/2012 01:57 PM, Kevin Yank wrote:
[…]

I’d try upgrading your Ruby to 1.9.3 (you’re on 1.9.1). Examples of
this error I was able to find with Google (including this Chef bug:
http://tickets.opscode.com/browse/CHEF-2363) were generally traced to
bugs in Ruby and/or OpenSSL.

The ruby path has 1.9.1, but I run ruby 1.9.3 on this machine already:
node31:~ # ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
This is a SLE11 SP2 machine.

The bug you linked is fixed on my version of chef (10.12.0), I just
tested it. But it could still be a ruby or SSL error of course.

Regards,
Nanuk