0

I just setup the open source chef server on an Ubuntu 12.04 EC2 instance, I've setup my webui and am able to get responses from my knife commands

ie: knife node list, knife client list, knife user list, etc...

I'm able to update roles, databags, environments, etc...

but I cannot upload any cookbooks. I'm running my workstation on Mac OSX.

I keep getting this output at the end of my command knife cookbook upload -VV curl. Doesn't matter what cookbook I upload, or if I upload them all - I keep getting the same response

DEBUG: Chef::HTTP calling Chef::HTTP::ValidateContentLength#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONToModelOutput#handle_response 
/usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http/json_output.rb:51:in `handle_response': undefined method `chomp' for nil:NilClass (NoMethodError)
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:229:in `block in apply_response_middleware'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:227:in `each'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:227:in `inject'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:227:in `apply_response_middleware'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:144:in `request'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/http.rb:118:in `put'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/cookbook_uploader.rb:123:in `block in uploader_function_for'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/util/threaded_job_queue.rb:52:in `call'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/util/threaded_job_queue.rb:52:in `block (3 levels) in process'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/util/threaded_job_queue.rb:50:in `loop'
    from /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/util/threaded_job_queue.rb:50:in `block (2 levels) in process'INFO: HTTP Request Returned 204 No Content:

Update

Here are some logs from chef-server-ctl tail when trying to upload a cookbook. Specifically the Curl cookbook from the supermarket (https://supermarket.getchef.com/cookbooks/curl)

==> /var/log/chef-server/nginx/access.log <==                                    
66.194.117.42 - - [25/Aug/2014:13:53:51 +0000]  "-" 400 "17.323" 0 "-" "-" "-" "-" "-" "-" "-" "-" "-" "-" 0
66.194.117.42 - - [25/Aug/2014:13:54:02 +0000]  "GET /cookbooks?num_versions=all HTTP/1.1" 200 "0.043" 2 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" 
"127.0.0.1:8000" "200" "0.005" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:04Z" "2jmj7l5rSw0yVb/vlWAYkK/YBwk=" 1015
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "POST /sandboxes HTTP/1.1" 201 "0.086" 4793 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:8000" "201" "0.034" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "kuuutc8sXtxwgp1SfQDCiTlDVSE=" 1667
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-6018ac1d9a3dc60e60cea330c8ff75cd?AWSAccessKeyId=1234&Expires=1408975742&Signature=OaCSqljXFv7m6ThHbGoUCEc4Fz8%3D HTTP/1.1" 204 "0.095" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.036" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "BcUdLrylrlgKhZNg7Y/HGHl1mT8=" 2128
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-3196d8943c0ea94e9489377eacc21ed4?AWSAccessKeyId=1234&Expires=1408975742&Signature=0CeVN/%2BF1zmYz5cH2soNx4XAwAk%3D HTTP/1.1" 204 "0.079" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.031" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "abL+Fy2NJNpl0p/t7HYKFpu7f80=" 1306
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-0b4fc89b05b26beaec4bb868b4ed02cd?AWSAccessKeyId=1234&Expires=1408975742&Signature=3mkSXw38s3dQnWsVO68ywv8ACgc%3D HTTP/1.1" 204 "0.088" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.037" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "3gPs/raANHSfb0F3owWCdGZ8ZWA=" 3285
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-a5e50c3180fb59e1f44b78dcbd21471a?AWSAccessKeyId=1234&Expires=1408975742&Signature=onznGMpyE/OHkyRx/IAkRVyjnA0%3D HTTP/1.1" 204 "0.093" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.038" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "XsDeXpR33EJCYXTrpD0ohdyQ518=" 1985
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-8724597c7318f5dabbd4ea0c9919777a?AWSAccessKeyId=1234&Expires=1408975742&Signature=eI61PsvTUzLY98Lp3zhNp1pnxwU%3D HTTP/1.1" 204 "0.096" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.041" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "vinbjGIK4VXnHwk7/4swKCHSqYk=" 1644
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-b3348b95d7571534c9a0b0fbc28bc5be?AWSAccessKeyId=1234&Expires=1408975742&Signature=u6KGOaQnv8aKZeG4TEnh/xd8HG4%3D HTTP/1.1" 204 "0.096" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.036" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "P9j8rLZNU1a33Cdi/4MH1b8llpo=" 1305
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-6eea4a8cbe0c2ad70ed3a58f262a3742?AWSAccessKeyId=1234&Expires=1408975742&Signature=PXdaOy4IPqrqWytel7VQS2meV5I%3D HTTP/1.1" 204 "0.096" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.029" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "U98rQ1YQyWMYlKzP/4DJfeBZSa8=" 6694
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-56c6c4a6a02fcc5da5d2bd2b079bc6c5?AWSAccessKeyId=1234&Expires=1408975742&Signature=T7MVPgc8ppI5acnh%2B8wuPGP0lJE%3D HTTP/1.1" 204 "0.102" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.046" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "n7ArNA08mQ6LaVC/oKd0/QqhVuI=" 2036
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-1dece7821bf3fd70fe1309eaa37d52a2?AWSAccessKeyId=1234&Expires=1408975742&Signature=ty%2BM6DlMXMx01uTIC6dJfrScmoE%3D HTTP/1.1" 204 "0.099" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.018" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "KUtDss7JkZBjvho7SehyJkhCR3k=" 11445
66.194.117.42 - - [25/Aug/2014:13:54:03 +0000]  "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-3f2c714c867f2e3ed7b857e28a17c93f?AWSAccessKeyId=1234&Expires=1408975742&Signature=y6OjpbeZZRXCGyKks%2BCihJJy5Bo%3D HTTP/1.1" 204 "0.075" 0 "-" "Chef Knife/12.0.0.alpha.1 (ruby-2.1.2-p95; ohai-7.2.4; x86_64-darwin13.0; +http://opscode.com)" "127.0.0.1:4321" "204" "0.023" "12.0.0.alpha.1" "algorithm=sha1;version=1.0;" "admin" "2014-08-25T13:54:05Z" "pbkYFOKbnZ02BrlV22wKsUgIi6M=" 1442

==> /var/log/chef-server/erchef/erchef.log.1 <==                                 
2014-08-25T13:54:02Z [email protected] INFO req_id=ZqKp8lzLIB6bEPEY5EB5rg==; status=200; method=GET; path=/cookbooks?num_versions=all; user=admin; msg=[]; req_time=3; rdbms_time=0; rdbms_count=3
2014-08-25T13:54:02Z [email protected] INFO req_id=7irZfs6MikokYy30Ub0j/A==; status=201; method=POST; path=/sandboxes; user=admin; msg=[]; req_time=32; rdbms_time=27; rdbms_count=4
9
  • Is this a community cookbook or a cookbook you created yourself?
    – Rilindo
    Aug 22, 2014 at 21:39
  • What do the server logs contain? Aug 22, 2014 at 21:53
  • Have you installed Chef using the Omnibus installer (download from getchef.com) or via rubygems? Aug 24, 2014 at 16:19
  • @StephenKing I installed via omnibus installer.
    – veilig
    Aug 25, 2014 at 13:55
  • 1
    I still think that you have a rubygems installation somewhere.. you're running a 12.0.0.alpha.1 version in /usr/local/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/. Check, if gem list includes chef (and uninstall). Aug 25, 2014 at 15:15

0

You must log in to answer this question.

Browse other questions tagged .