404 Net::HTTPServerException: cookbook_file

hi. i’m occasionally seeing an error lately on my clients. they complain
of:
FATAL: Net::HTTPServerException: remote_directory[/usr/local/bin] (toolbin::default line 27) had an error: Net::HTTPServerException: cookbook_file[/usr/local/bin/ec2-chef-ci] (dynamically defined) had an error: Net::HTTPServerException: 404 “Not Found”

detail of error: https://gist.github.com/2871114

but the file, ec2-chef-ci, is there in the cookbook. if i run chef-client
again, the error doesn’t occur again (so far). the recipe that
places that file, among others does this:

remote_directory “/usr/local/bin” do
source "usr/local/bin"
files_owner "root"
files_group "root"
files_mode "0755"
owner "root"
group "root"
mode "0755"
end

any clues as to what to look for? i’m about to turn on debug logging
on my server.

server: Ubuntu 11.04, chef 0.10.8
clients: Centos 5.8, chef-full-0.10.8-3, and some chef-full-0.10.10-1

thanks,
kallen

ok, i get it, and reproduced it.

what's happening is, a chef-client will kick off its run, and while that's
happening, i'll upload an update for that cookbook, for that file
specifically. thus mid-client-run, the url to that file changes out from under
the client.

i.e.

$ knife cookbook show toolbin 0.0.1 | grep -C 3 ec2-chef-ci
specificity: default
url:
https://chef.wewp.com/cookbooks/toolbin/0.0.1/files/1d85f0f7cee8fb910e68864eed443d1d
^^^ changes

kallen

On Mon, 04 Jun 2012, kallen@groknaut.net wrote:

hi. i'm occasionally seeing an error lately on my clients. they complain
of:
FATAL: Net::HTTPServerException: remote_directory[/usr/local/bin] (toolbin::default line 27) had an error: Net::HTTPServerException: cookbook_file[/usr/local/bin/ec2-chef-ci] (dynamically defined) had an error: Net::HTTPServerException: 404 "Not Found"

detail of error: 404 Net::HTTPServerException: cookbook_file · GitHub

but the file, ec2-chef-ci, is there in the cookbook. if i run chef-client
again, the error doesn't occur again (so far). the recipe that
places that file, among others does this:

remote_directory "/usr/local/bin" do
source "usr/local/bin"
files_owner "root"
files_group "root"
files_mode "0755"
owner "root"
group "root"
mode "0755"
end

any clues as to what to look for? i'm about to turn on debug logging
on my server.

server: Ubuntu 11.04, chef 0.10.8
clients: Centos 5.8, chef-full-0.10.8-3, and some chef-full-0.10.10-1

thanks,
kallen