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

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

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:in rbuf_fill'
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:in readline'
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_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:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:in request'
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:in start'
/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:in block 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:in
streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:139:in fetch'
/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:in highlight_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:in each'
/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:in block 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:in partial'
/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:in each'
/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:in render'
/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:in show'
/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:in block 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:in dispatch_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:in handle'
/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:in call'
/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:in block 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:in pre_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:in receive_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:in run'
/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:in start'
/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:in start_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:in bootup'
/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:in fork'
/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:in start'
/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

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:in rbuf_fill'
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:in readline'
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_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:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:in request'
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:in start'
/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:in block 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:in streaming_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:in sync_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:in run'

/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:in run'
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in <top (required)>' /usr/bin/chef-client:19:in load'
/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:in read_nonblock'
/usr/lib64/ruby/1.9.1/net/protocol.rb:135:in rbuf_fill' /usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil'
/usr/lib64/ruby/1.9.1/net/protocol.rb:126:in readline' /usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_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:in transport_request'
/usr/lib64/ruby/1.9.1/net/http.rb:1177:in request' /usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request'
/usr/lib64/ruby/1.9.1/net/http.rb:627:in start' /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:in block
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:in streaming_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:in sync_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:in run'
/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:in run'
/usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in <top (required)>' /usr/bin/chef-client:19:in load'
/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:in rbuf_fill'
/usr/lib64/ruby/1.9.1/net/protocol.rb:116:in readuntil' /usr/lib64/ruby/1.9.1/net/protocol.rb:126:in readline'
/usr/lib64/ruby/1.9.1/net/http.rb:2219:in read_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:in transport_request' /usr/lib64/ruby/1.9.1/net/http.rb:1177:in request'
/usr/lib64/ruby/1.9.1/net/http.rb:1170:in block in request' /usr/lib64/ruby/1.9.1/net/http.rb:627:in start'
/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:in
block 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:in
streaming_request' /usr/lib64/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/rest.rb:139:in fetch'
/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:in highlight_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:in each'
/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:in block 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:in partial'
/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:in each'
/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:in render'
/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:in show'
/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:in block 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:in dispatch_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:in handle'
/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:in call'
/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:in block 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:in pre_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:in receive_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:in run'
/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:in start'
/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:in start_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:in bootup'
/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:in fork'
/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:in start'
/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

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