500 "Internal Server Error" (Net::HTTPFatalError) when running chef client

Hi guys,

I meet a 500 “Internal Server Error” (Net::HTTPFatalError) when I’m
running chef client on ubuntu 9.04 / 8.04.

The following is the log:

chef@chef-client-test:~$ sudo chef-client -l debug
/usr/lib/ruby/1.8/net/http.rb:2097:in error!': 500 "Internal Server Error" (Net::HTTPFatalError) from /usr/lib/ruby/1.8/chef/rest.rb:233:inrun_request’
from /usr/lib/ruby/1.8/chef/rest.rb:85:in get_rest' from /usr/lib/ruby/1.8/chef/client.rb:342:insync_provider_files’
from /usr/lib/ruby/1.8/chef/client.rb:83:in run' from /usr/lib/ruby/1.8/chef/application/client.rb:186:inrun_application’
from /usr/lib/ruby/1.8/chef/application/client.rb:178:in loop' from /usr/lib/ruby/1.8/chef/application/client.rb:178:inrun_application’
from /usr/lib/ruby/1.8/chef/application.rb:57:in `run’
from /usr/bin/chef-client:25

What could this be?

Thanks
Dikang

On Tue, Dec 15, 2009 at 5:55 AM, Dikang Gu dikang85@gmail.com wrote:

I meet a 500 "Internal Server Error" (Net::HTTPFatalError) when I'm
running chef client on ubuntu 9.04 / 8.04.

The following is the log:

Can you check the log on the server as well please?

yes, like this:

~ -----------------------------url :
http://localhost:5984/chef_bak/node_ntop-------------------------------
~ url.user : -------------------
~ Sending HTTP Request via GET to /chef_bak/node_ntop
~ Node requires quick_start
merb : worker (port 4000) ~ {:after_filters_time=>1.2e-05,
:before_filters_time=>0.000365, :action_time=>0.012767,
:dispatch_time=>0.013195}
merb : worker (port 4000) ~

merb : worker (port 4000) ~ Started request handling: Tue Dec 15 22:06:33
+0800 2009
merb : worker (port 4000) ~ Routed to: {"format"=>nil, "node"=>"ntop",
"action"=>"show", "id"=>"_provider_files",
"controller"=>"chef_server_slice/cookbooks"}
merb : worker (port 4000) ~ Params: {"format"=>nil, "node"=>"ntop",
"action"=>"show", "id"=>"_provider_files",
"controller"=>"chef_server_slice/cookbooks"}
merb : worker (port 4000) ~ Cannot find a cookbook named _provider_files;
did you forget to add metadata to a cookbook? (
http://wiki.opscode.com/display/chef/Metadata) - (ArgumentError)
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:111:in []' /usr/share/chef-server-slice/app/controllers/cookbooks.rb:34:in show'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in send' /usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:in _call_action'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:289:in
`_dispatch'

WHAT DOES THE "_provider_files" ?

thanks
Dikang

On Tue, Dec 15, 2009 at 9:56 PM, Bryan McLellan btm@loftninjas.org wrote:

On Tue, Dec 15, 2009 at 5:55 AM, Dikang Gu dikang85@gmail.com wrote:

I meet a 500 "Internal Server Error" (Net::HTTPFatalError) when I'm
running chef client on ubuntu 9.04 / 8.04.

The following is the log:

Can you check the log on the server as well please?

On Tue, Dec 15, 2009 at 6:11 AM, Dikang Gu dikang85@gmail.com wrote:

merb : worker (port 4000) ~ Cannot find a cookbook named _provider_files;
did you forget to add metadata to a cookbook?
(http://wiki.opscode.com/display/chef/Metadata) - (ArgumentError)
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:111:in `'

Are both your server and your client version 0.7.12?

http://wiki.opscode.com/display/chef/FAQ+-+When+Trouble+Strikes

I do the apt upgrade on both chef server and client. I think at least
the sever is 7.14

On 12/15/09, Bryan McLellan btm@loftninjas.org wrote:

On Tue, Dec 15, 2009 at 6:11 AM, Dikang Gu dikang85@gmail.com wrote:

merb : worker (port 4000) ~ Cannot find a cookbook named _provider_files;
did you forget to add metadata to a cookbook?
(http://wiki.opscode.com/display/chef/Metadata) - (ArgumentError)
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:111:in `'

Are both your server and your client version 0.7.12?

http://wiki.opscode.com/display/chef/FAQ+-+When+Trouble+Strikes

--
Sent from Gmail for mobile | mobile.google.com

On Tue, Dec 15, 2009 at 6:29 AM, Dikang Gu dikang85@gmail.com wrote:

I do the apt upgrade on both chef server and client. I think at least
the sever is 7.14

Run: apt-cache policy chef-server

on the chef server:

root@chef-server:~# apt-cache policy chef-server
chef-server:
Installed: 0.7.14-2
Candidate: 0.7.14-2
Version table:
*** 0.7.14-2 0
500 http://apt.opscode.com jaunty/universe Packages
100 /var/lib/dpkg/status

on the chef client:
chef@chef-client-test:~$ apt-cache policy chef
chef:
Installed: 0.7.14-2
Candidate: 0.7.14-2
Version table:
*** 0.7.14-2 0
500 http://apt.opscode.com jaunty/universe Packages
100 /var/lib/dpkg/status

So, the chef-server and chef-client should have the same version, 0.7.14,
right?

Dikang

On Tue, Dec 15, 2009 at 10:57 PM, Bryan McLellan btm@loftninjas.org wrote:

On Tue, Dec 15, 2009 at 6:29 AM, Dikang Gu dikang85@gmail.com wrote:

I do the apt upgrade on both chef server and client. I think at least
the sever is 7.14

Run: apt-cache policy chef-server

Just as said in the wiki:
http://wiki.opscode.com/display/chef/FAQ+-+When+Trouble+Strikes

The chef server does not know how to deal with the _provider_files and
_resource_files, so I manually comment the sync_provider_files and
sync_resource_files functions, then the client seems to work well.

Is this a bug for 0.7.14?

Dikang

On Tue, Dec 15, 2009 at 11:32 PM, Dikang Gu dikang85@gmail.com wrote:

on the chef server:

root@chef-server:~# apt-cache policy chef-server
chef-server:
Installed: 0.7.14-2
Candidate: 0.7.14-2
Version table:
*** 0.7.14-2 0
500 http://apt.opscode.com jaunty/universe Packages
100 /var/lib/dpkg/status

on the chef client:
chef@chef-client-test:~$ apt-cache policy chef
chef:
Installed: 0.7.14-2
Candidate: 0.7.14-2
Version table:
*** 0.7.14-2 0
500 http://apt.opscode.com jaunty/universe Packages
100 /var/lib/dpkg/status

So, the chef-server and chef-client should have the same version, 0.7.14,
right?

Dikang

On Tue, Dec 15, 2009 at 10:57 PM, Bryan McLellan btm@loftninjas.orgwrote:

On Tue, Dec 15, 2009 at 6:29 AM, Dikang Gu dikang85@gmail.com wrote:

I do the apt upgrade on both chef server and client. I think at least
the sever is 7.14

Run: apt-cache policy chef-server

Actually,

This is commonly experienced when your server version is under 0.7.12 and your client is equal or greater then 0.7.12

There was some break points in the chef versions that cause hiccups.

Server Version equal or less 0.7.10, Client Version = 0.7.12 + = fail
Server Version = 0.7.12-0.7.6 Client Version 0.7.14 = should work

But mainly the chef-client is trying to find the cookbook _provider_files for lwrp; however how the error is handled on the server side is less then graceful... (http 500)

So either downgrade your chef gem on the client, or upgrade your server....

On Dec 15, 2009, at 6:15 AM, Bryan McLellan wrote:

On Tue, Dec 15, 2009 at 6:11 AM, Dikang Gu dikang85@gmail.com wrote:

merb : worker (port 4000) ~ Cannot find a cookbook named _provider_files;
did you forget to add metadata to a cookbook?
(http://wiki.opscode.com/display/chef/Metadata) - (ArgumentError)
/usr/lib/ruby/1.8/chef/cookbook_loader.rb:111:in `'

Are both your server and your client version 0.7.12?

http://wiki.opscode.com/display/chef/FAQ+-+When+Trouble+Strikes

!DSPAM:4b27fe81117001804284693!