Unable to upload cookbook (because something is wrong with my recipe?)
-
05-07-2021 - |
Question
I added another template to the existing recipe and the cookbook wont upload. This is my code:
/cookbook/recipe/default.rb
template "/opt/graphite/conf/blacklist.conf" do
source "blacklist.erb"
mode 0755
variables( :mac => node[:graphite][:blacklist][:mac] )
end
/cookbook/recipe/template/blacklist.erb
mac = <%= @mac %>
/cookbook/recipe/attributes/default.rb
default[:graphite][:blacklist][:mac] = "xyz\.mac"
This was just to tell chef to create a blacklist file for graphite. What did I do wrong? This is my error:
Uploading graphite [1.0.5]
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1u45f5v.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1mlzi8g.lock"]}ERROR: RestClient::InternalServerError: 500 Internal Server Error
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1pvrxcv.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1pl351l.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1crdpij.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-v8ijj3.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-ufrny2.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-jtztmr.lock"]}
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:134:in `block in uploader_function_for'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:25:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:25:in `block (3 levels) in setup_worker_threads'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:24:in `loop'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:24:in `block (2 levels) in setup_worker_threads'
Solution
This issue was totally un-related to the cookbooks. There was some issue with couchDB and since this was a long time back I can't seem to remember if I had to re-install or just restart couchDB but it did fix the issue.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow