End-of-file error when viewing/downloading a cookbook under Chef 0.10.8?


#1

I recently set up a test box to start playing with Chef 0.10. (We’re on
0.9 and planning to upgrade, and I’m using this box to verify that
cookbooks work under 0.10.) Things worked fine for a day or so, then all
of a sudden I started getting “end of file reached” when attempting to view
a cookbook in the web UI. I’m also unable to download a cookbook to the
chef-client, which of course means that chef-client doesn’t run.
Unfortunately, the stack trace is totally bufuddling me. I’m hoping that
someone might be able to give me a hand figuring out what the deal is.

OS is CentOS 5.7, ruby version 1.9.2p180. Chef was installed using the
bootstrap cookbook (specifically, bootstrap-test-20120113.tar.gz). CouchDB
version is 0.11.2, which I don’t actually think is the latest, but is the
version that the bootstrap decided to install.

Here’s the stack trace that’s being thrown to the server.log file when this
error happens:

[Thu, 26 Jan 2012 15:10:20 -0500] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
merb : chef-server (api) : worker (port 4000) ~ Started request handling:
2012-01-26 15:10:20 -0500
merb : chef-server (api) : worker (port 4000) ~ Routed to:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~ Params:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.005201, :after_filters_time=>2.2e-05,
:action_time=>0.010645, :dispatch_time=>0.011327}
merb : chef-server (api) : worker (port 4000) ~

[Thu, 26 Jan 2012 15:10:20 -0500] ERROR: end of file reached
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in read_nonblock' /usr/lib64/ruby/1.9.1/net/protocol.rb:135:inrbuf_fill’
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:inreadline’
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_status_line' /usr/lib64/ruby/1.9.1/net/http.rb:2208:inread_new’
/usr/lib64/ruby/1.9.1/net/http.rb:1191:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:inrequest’
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:instart’
/usr/lib64/ruby/1.9.1/net/http.rb:1168:in request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:84:inblock in call’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:99:in
hide_net_http_bug' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:83:incall’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:261:in block in streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:296:inretriable_rest_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:259:in
streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:139:infetch’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/application.rb:222:in
syntax_highlight' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:154:inhighlight_content’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:6:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:326:inblock in partial’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:in
map' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:inpartial’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:13:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:137:inrender’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:222:in
display' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:65:inshow’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:321:in
_call_action' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:289:inblock in _dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in_dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:285:in
_dispatch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:262:in_call’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:252:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:91:indispatch_action’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:69:in
handle' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:29:inhandle’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/application.rb:17:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/middleware/static.rb:28:incall’
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in
call' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:inblock in pre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:inpre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in
process' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:inreceive_data’
/usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run_machine' /usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in
start' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/thin.rb:30:in
start_server' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:305:instart_at_port’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:138:in
start' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:174:inbootup’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:159:in
block in daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:infork’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:in
daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:35:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core.rb:165:in
start' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/bin/chef-server-webui:71:in<top (required)>’
/usr/sbin/chef-server-webui:19:in load' /usr/sbin/chef-server-webui:19:in


Ian Marlier | Senior Systems Engineer
Brightcove, Inc.
One Cambridge Center, 12th Floor, Cambridge, MA 02142
imarlier@brightcove.com


#2

Check the ruby in your cookbook. My guess is that you left a delimiter off
somewhere.

I’d be more interested in seeing the chef-client stack trace that the
server view one.

On Thu, Jan 26, 2012 at 12:20 PM, Ian Marlier imarlier@brightcove.comwrote:

I recently set up a test box to start playing with Chef 0.10. (We’re on
0.9 and planning to upgrade, and I’m using this box to verify that
cookbooks work under 0.10.) Things worked fine for a day or so, then all
of a sudden I started getting “end of file reached” when attempting to view
a cookbook in the web UI. I’m also unable to download a cookbook to the
chef-client, which of course means that chef-client doesn’t run.
Unfortunately, the stack trace is totally bufuddling me. I’m hoping that
someone might be able to give me a hand figuring out what the deal is.

OS is CentOS 5.7, ruby version 1.9.2p180. Chef was installed using the
bootstrap cookbook (specifically, bootstrap-test-20120113.tar.gz). CouchDB
version is 0.11.2, which I don’t actually think is the latest, but is the
version that the bootstrap decided to install.

Here’s the stack trace that’s being thrown to the server.log file when
this error happens:

[Thu, 26 Jan 2012 15:10:20 -0500] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
merb : chef-server (api) : worker (port 4000) ~ Started request handling: 2012-01-26
15:10:20 -0500
merb : chef-server (api) : worker (port 4000) ~ Routed to:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~ Params:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.005201, :after_filters_time=>2.2e-05,
:action_time=>0.010645, :dispatch_time=>0.011327}
merb : chef-server (api) : worker (port 4000) ~

[Thu, 26 Jan 2012 15:10:20 -0500] ERROR: end of file reached
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in read_nonblock' /usr/lib64/ruby/1.9.1/net/protocol.rb:135:inrbuf_fill’
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:inreadline’
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_status_line' /usr/lib64/ruby/1.9.1/net/http.rb:2208:inread_new’
/usr/lib64/ruby/1.9.1/net/http.rb:1191:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:inrequest’
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:instart’
/usr/lib64/ruby/1.9.1/net/http.rb:1168:in request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:84:inblock in call’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:99:in
hide_net_http_bug' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:83:incall’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:261:in block in streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:296:inretriable_rest_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:259:in
streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:139:infetch’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/application.rb:222:in
syntax_highlight' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:154:inhighlight_content’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:6:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:326:inblock in partial’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:in
map' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:inpartial’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:13:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:137:inrender’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:222:in
display' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:65:inshow’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:321:in
_call_action' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:289:inblock in _dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in_dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:285:in
_dispatch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:262:in_call’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:252:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:91:indispatch_action’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:69:in
handle' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:29:inhandle’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/application.rb:17:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/middleware/static.rb:28:incall’
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in
call' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:inblock in pre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:inpre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in
process' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:inreceive_data’
/usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run_machine' /usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in
start' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/thin.rb:30:in
start_server' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:305:instart_at_port’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:138:in
start' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:174:inbootup’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:159:in
block in daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:infork’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:in
daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:35:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core.rb:165:in
start' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/bin/chef-server-webui:71:in<top (required)>’
/usr/sbin/chef-server-webui:19:in load' /usr/sbin/chef-server-webui:19:in


Ian Marlier | Senior Systems Engineer
Brightcove, Inc.
One Cambridge Center, 12th Floor, Cambridge, MA 02142
imarlier@brightcove.com


#3

I’m pretty sure that it’s not a problem with syntax. Not only do all of
the cookbooks pass a syntax check with ruby -c, but all of the cookbooks
worked previously, and have not been modified since that time. Also, I’m
having the exact same problem with all of my cookbooks.

The client side stack trace looks like this:

[Thu, 26 Jan 2012 15:48:20 -0500] DEBUG: Sending HTTP Request via GET to
chef.localdomain:4000/cookbooks/yum/0.0.1/files/b0f61e3c2e4c4b49ac187044d05ab43b
[Thu, 26 Jan 2012 15:48:20 -0500] ERROR: Running exception handlers
[Thu, 26 Jan 2012 15:48:20 -0500] FATAL: Saving node information to
/srv/chef/cache/failed-run-data.json
[Thu, 26 Jan 2012 15:48:20 -0500] ERROR: Exception handlers complete
[Thu, 26 Jan 2012 15:48:20 -0500] DEBUG: Re-raising exception: EOFError -
end of file reached
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in read_nonblock' /usr/lib64/ruby/1.9.1/net/protocol.rb:135:inrbuf_fill’
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:inreadline’
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_status_line' /usr/lib64/ruby/1.9.1/net/http.rb:2208:inread_new’
/usr/lib64/ruby/1.9.1/net/http.rb:1191:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:inrequest’
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:instart’
/usr/lib64/ruby/1.9.1/net/http.rb:1168:in `request’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:84:in
`block in call’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:99:in
`hide_net_http_bug’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:83:in
call' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:261:inblock in streaming_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:296:in
retriable_rest_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:259:instreaming_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:112:in
`get_rest’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:378:in
`block (2 levels) in sync_cookbook_file_cache’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:359:in
`each’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:359:in
`block in sync_cookbook_file_cache’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:357:in
`each’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:357:in
`sync_cookbook_file_cache’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:322:in
`block in sync_cookbooks’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:321:in
`each’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:321:in
sync_cookbooks' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:297:insync_cookbooks’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:191:in
setup_run_context' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:159:inrun’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:239:in
`block in run_application’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in
`loop’

/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in
run_application' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in <top (required)>' /usr/bin/chef-client:19:inload’
/usr/bin/chef-client:19:in <main>' [Thu, 26 Jan 2012 15:48:20 -0500] FATAL: Stacktrace dumped to /srv/chef/cache/chef-stacktrace.out [Thu, 26 Jan 2012 15:48:20 -0500] DEBUG: EOFError: end of file reached /usr/lib64/ruby/1.9.1/net/protocol.rb:135:inread_nonblock’
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in rbuf_fill' /usr/lib64/ruby/1.9.1/net/protocol.rb:116:inreaduntil’
/usr/lib64/ruby/1.9.1/net/protocol.rb:126:in readline' /usr/lib64/ruby/1.9.1/net/http.rb:2219:inread_status_line’
/usr/lib64/ruby/1.9.1/net/http.rb:2208:in read_new' /usr/lib64/ruby/1.9.1/net/http.rb:1191:intransport_request’
/usr/lib64/ruby/1.9.1/net/http.rb:1177:in request' /usr/lib64/ruby/1.9.1/net/http.rb:1170:inblock in request’
/usr/lib64/ruby/1.9.1/net/http.rb:627:in start' /usr/lib64/ruby/1.9.1/net/http.rb:1168:inrequest’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:84:in
block in call' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:99:inhide_net_http_bug’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:83:in
call' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:261:inblock
in streaming_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:296:in
retriable_rest_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:259:instreaming_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:112:in
get_rest' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:378:inblock (2 levels) in sync_cookbook_file_cache’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:359:in
each' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:359:inblock in sync_cookbook_file_cache’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:357:in
each' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:357:insync_cookbook_file_cache’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:322:in
block in sync_cookbooks' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:321:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:321:in
sync_cookbooks' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:297:insync_cookbooks’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:191:in
setup_run_context' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:159:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:239:in
block in run_application' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:inloop’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in
run_application' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in <top (required)>' /usr/bin/chef-client:19:inload’
/usr/bin/chef-client:19:in `’
[Thu, 26 Jan 2012 15:48:20 -0500] FATAL: EOFError: end of file reached

On Thu, Jan 26, 2012 at 3:45 PM, Edward Sargisson esarge@pobox.com wrote:

Check the ruby in your cookbook. My guess is that you left a delimiter off
somewhere.

I’d be more interested in seeing the chef-client stack trace that the
server view one.

On Thu, Jan 26, 2012 at 12:20 PM, Ian Marlier imarlier@brightcove.comwrote:

I recently set up a test box to start playing with Chef 0.10. (We’re on
0.9 and planning to upgrade, and I’m using this box to verify that
cookbooks work under 0.10.) Things worked fine for a day or so, then all
of a sudden I started getting “end of file reached” when attempting to view
a cookbook in the web UI. I’m also unable to download a cookbook to the
chef-client, which of course means that chef-client doesn’t run.
Unfortunately, the stack trace is totally bufuddling me. I’m hoping that
someone might be able to give me a hand figuring out what the deal is.

OS is CentOS 5.7, ruby version 1.9.2p180. Chef was installed using the
bootstrap cookbook (specifically, bootstrap-test-20120113.tar.gz). CouchDB
version is 0.11.2, which I don’t actually think is the latest, but is the
version that the bootstrap decided to install.

Here’s the stack trace that’s being thrown to the server.log file when
this error happens:

[Thu, 26 Jan 2012 15:10:20 -0500] DEBUG: Sending HTTP Request via GET to
localhost:5984/chef/_design/id_map/_view/name_to_id
merb : chef-server (api) : worker (port 4000) ~ Started request handling: 2012-01-26
15:10:20 -0500
merb : chef-server (api) : worker (port 4000) ~ Routed to:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~ Params:
{“controller”=>“cookbooks”, “action”=>“show_file”,
“cookbook_name”=>“apparmor”, “cookbook_version”=>“0.0.1”,
“checksum”=>“e7bc93ea0a75c8ef48d2e540d3fe8fd4”}
merb : chef-server (api) : worker (port 4000) ~
{:before_filters_time=>0.005201, :after_filters_time=>2.2e-05,
:action_time=>0.010645, :dispatch_time=>0.011327}
merb : chef-server (api) : worker (port 4000) ~

[Thu, 26 Jan 2012 15:10:20 -0500] ERROR: end of file reached
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in read_nonblock' /usr/lib64/ruby/1.9.1/net/protocol.rb:135:inrbuf_fill’
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:inreadline’
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_status_line' /usr/lib64/ruby/1.9.1/net/http.rb:2208:inread_new’
/usr/lib64/ruby/1.9.1/net/http.rb:1191:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:inrequest’
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:instart’
/usr/lib64/ruby/1.9.1/net/http.rb:1168:in request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:84:inblock in call’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:99:in
hide_net_http_bug' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest/rest_request.rb:83:incall’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:261:in
block in streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:296:inretriable_rest_request’
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:259:in
streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:139:infetch’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/application.rb:222:in
syntax_highlight' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:154:inhighlight_content’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:6:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/_cookbook_content.html.haml:3:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks____cookbook__content_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:326:inblock in partial’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:in
map' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:321:inpartial’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:13:in
block in __usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:ineach’
/usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/views/cookbooks/show.html.haml:12:in
__usr__lib64__ruby__gems__1_9_1__gems__chef__server__webui__0_10_8__app__views__cookbooks__show_html_haml' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:137:inrender’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/mixins/render.rb:222:in
display' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/app/controllers/cookbooks.rb:65:inshow’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:321:in
_call_action' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:289:inblock in _dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:284:in_dispatch’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:285:in
_dispatch' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:262:in_call’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/controller/merb_controller.rb:252:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:91:indispatch_action’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:69:in
handle' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/dispatch/dispatcher.rb:29:inhandle’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/application.rb:17:in
call' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/middleware/static.rb:28:incall’
/usr/lib64/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in
call' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:inblock in pre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in
catch' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:inpre_process’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in
process' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:inreceive_data’
/usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run_machine' /usr/lib64/ruby/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun’
/usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in
start' /usr/lib64/ruby/gems/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/thin.rb:30:in
start_server' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:305:instart_at_port’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/rack/adapter/abstract.rb:138:in
start' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:174:inbootup’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:159:in
block in daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:infork’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:143:in
daemonize' /usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core/server.rb:35:instart’
/usr/lib64/ruby/gems/1.9.1/gems/merb-core-1.1.3/lib/merb-core.rb:165:in
start' /usr/lib64/ruby/gems/1.9.1/gems/chef-server-webui-0.10.8/bin/chef-server-webui:71:in<top (required)>’
/usr/sbin/chef-server-webui:19:in load' /usr/sbin/chef-server-webui:19:in


Ian Marlier | Senior Systems Engineer
Brightcove, Inc.
One Cambridge Center, 12th Floor, Cambridge, MA 02142
imarlier@brightcove.com


Ian Marlier | Senior Systems Engineer
Brightcove, Inc.
One Cambridge Center, 12th Floor, Cambridge, MA 02142
imarlier@brightcove.com


#4

On 26/01/12 21:46, Ian Marlier wrote:

I’m pretty sure that it’s not a problem with syntax. Not only do all
of the cookbooks pass a syntax check with ruby -c, but all of the
cookbooks worked previously, and have not been modified since that
time. Also, I’m having the exact same problem with all of my cookbooks.

I found a purge and upload worked when I was seeing that error previously.

knife cookbook delete -yap
knife cookbook upload

Regards,
Tom