[chef] Re: Re: Re: Re: berks upload error


Chronological Thread 
  • From: Michael Lindsay < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: berks upload error
  • Date: Wed, 13 May 2015 15:25:20 -0700

So, because all of my cookbooks depend on other cookbooks had to find one that I depended on that nothing else did so...

1) knife cookbook upload

Banks-2:md-chef mlindsay$ git clone :opscode-cookbooks/users.git

Cloning into 'users'...

remote: Counting objects: 468, done.

remote: Total 468 (delta 0), reused 0 (delta 0), pack-reused 468

Receiving objects: 100% (468/468), 94.43 KiB | 0 bytes/s, done.

Resolving deltas: 100% (176/176), done.

Checking connectivity... done.

Banks-2:md-chef mlindsay$ knife cookbook upload users -c ~/.chef/knife.rb

ERROR: knife encountered an unexpected error

This may be a bug in the 'cookbook upload' knife command or plugin

Please collect the output of this command with the `-VV` option before filing a bug report.

Exception: NoMethodError: undefined method `source_url' for #<Chef::Cookbook::Metadata:0x007fd59a168ee8>

Banks-2:md-chef mlindsay$ knife cookbook upload users -c ~/.chef/knife.rb -VV

DEBUG: No chefignore file found at /Users/mlindsay/chefignore no files will be ignored

/Users/mlindsay/md-chef/users/metadata.rb:8:in `from_file': undefined method `source_url' for #<Chef::Cookbook::Metadata:0x007f9751ace960> (NoMethodError)

from /opt/chefdk/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in `instance_eval'

from /opt/chefdk/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in `from_file'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:172:in `apply_ruby_metadata'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:110:in `block in metadata'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:107:in `each'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:107:in `metadata'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:99:in `block in cookbook_version'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:88:in `tap'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook/cookbook_version_loader.rb:88:in `cookbook_version'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook_loader.rb:95:in `load_cookbook'

from /opt/chefdk/embedded/apps/chef/lib/chef/cookbook_loader.rb:103:in `[]'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife/cookbook_upload.rb:171:in `block in cookbooks_to_upload'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife/cookbook_upload.rb:168:in `each'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife/cookbook_upload.rb:168:in `cookbooks_to_upload'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife/cookbook_upload.rb:206:in `warn_about_cookbook_shadowing'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife/cookbook_upload.rb:96:in `run'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:493:in `run_with_pretty_exceptions'

from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:174:in `run'

from /opt/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:139:in `run'

from /opt/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'

from /opt/chefdk/bin/knife:34:in `load'

from /opt/chefdk/bin/knife:34:in `<main>'


2)

:/home/ubuntu# chef-server-ctl status

run: bookshelf: (pid 6463) 14882s; run: log: (pid 5272) 15207s

3) 

# AUTO-GENERATED BY CHEF - DO NOT MODIFY


topology "standalone"

api_fqdn "chef.DOMAIN.com"




On Wed, May 13, 2015 at 1:48 PM, Stephen Delano < " target="_blank"> > wrote:
Thanks Michael,

A few more things:

- Does the same error (or at least a similar failure) occur when you run a `knife cookbook upload`?
- From the Chef Server, what is the output of the `chef-server-ctl status` command? Is the bookshelf service running? I expect it is if you’ve gotten this far.
- What are the contents of your /etc/opscode/chef-server.rb configuration file (on the Chef Server)?

Thanks!


Stephen Delano - Engineering Lead, Chef


On Wed, May 13, 2015 at 1:27 PM, Michael Lindsay < " target="_blank"> > wrote:

Hey Stephen, 

Thanks for getting back to me...  Is this the kind of thing you are looking for?

==> /var/log/opscode/opscode-erchef/crash.log <==

2015-05-13 20:17:17 =ERROR REPORT====

Checking presence of checksum: <<"5b259a23bcccc6be76de01d811162d36">> for org <<"f03b7e8dadaf3bb09705d81dca36ec74">> from bucket "bookshelf" has taken longer than 5000 ms

2015-05-13 20:17:17 =ERROR REPORT====

Checking presence of checksum: <<"668e14353b42023b737efa15b3c675b9">> for org <<"f03b7e8dadaf3bb09705d81dca36ec74">> from bucket "bookshelf" has taken longer than 5000 ms


==> /var/log/opscode/opscode-erchef/current <==

2015-05-13_20:17:17.33628 [error] Checking presence of checksum: <<"5b259a23bcccc6be76de01d811162d36">> for org <<"f03b7e8dadaf3bb09705d81dca36ec74">> from bucket "bookshelf" has taken longer than 5000 ms

2015-05-13_20:17:17.33629 


==> /var/log/opscode/opscode-erchef/erchef.log <==

2015-05-13 20:17:17.330 [error] Checking presence of checksum: <<"668e14353b42023b737efa15b3c675b9">> for org <<"f03b7e8dadaf3bb09705d81dca36ec74">> from bucket "bookshelf" has taken longer than 5000 ms



followed by this

==> /var/log/opscode/opscode-erchef/crash.log <==

2015-05-13 20:17:22 =ERROR REPORT====

{<<"method=PUT; path=/organizations/metrodigi/sandboxes/d81dca36ec74c00114c5f3438e323f7d; status=500; ">>,{error,{throw,{checksum_check_error,23},[{chef_wm_named_sandbox,validate_checksums_uploaded,2,[{file,"src/chef_wm_named_sandbox.erl"},{line,142}]},{chef_wm_named_sandbox,from_json,2,[{file,"src/chef_wm_named_sandbox.erl"},{line,97}]},{webmachine_resource,resource_call,3,[{file,"src/webmachine_resource.erl"},{line,186}]},{webmachine_resource,do,3,[{file,"src/webmachine_resource.erl"},{line,142}]},{webmachine_decision_core,resource_call,1,[{file,"src/webmachine_decision_core.erl"},{line,48}]},{webmachine_decision_core,accept_helper,1,[{file,"src/webmachine_decision_core.erl"},{line,616}]},{webmachine_decision_core,decision,1,[{file,"src/webmachine_decision_core.erl"},{line,521}]},{webmachine_decision_core,handle_request,2,[{file,"src/webmachine_decision_core.erl"},{line,33}]}]}}}


Here's a note, during my install, in order to get chef-server-ctl to work I had to:

sudo chmod 0644 /etc/opscode/pivotal.pem 

should I have not used sudo when I: chef-solo -o 'recipe[chef-server::default]' -j dna.json ?

Thanks,

 - Michael



On Wed, May 13, 2015 at 1:00 PM, Stephen Delano < " target="_blank"> > wrote:
Hi Michael,

The error `{“error”:[“internal service error”]}` is coming from the Chef Server, so the rest of that output is just Berks sending you a stacktrace.

In order to get closer to the root of the issue, you’ll need to provide some logs from the Chef Server. From the stacktrace, this appears to be happening when making a cookbook upload request: https://github.com/berkshelf/berkshelf/blob/master/lib/berkshelf/uploader.rb#L55-L60

You can find the relevant logs from the Chef Server in /var/log/opscode/opscode-erchef/requests.log.*

To filter them down, you should be able to grep for status=500, which is the corresponding error code. A message about what failed should be in the erchef log and should help us track down the issue.

Thanks!


Stephen Delano - Engineering Lead, Chef


On Wed, May 13, 2015 at 12:19 PM, Michael Lindsay < " target="_blank"> > wrote:

Hey All,

I'm just setting up a new chef server (inside a vpc) and I'm having trouble uploading the cookbooks with berks from my workstation:

Banks-2:base mlindsay$ berks upload -c ~/.berkshelf/vpc.json


E, [2015-05-13T12:14:00.542111 #16190] ERROR -- : Ridley::Errors::HTTPInternalServerError: {"error":["internal service error"]}

E, [2015-05-13T12:14:00.542241 #16190] ERROR -- : /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/middleware/chef_response.rb:24:in `on_complete'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:9:in `block in call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in `on_complete'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/middleware/chef_auth.rb:74:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request/retry.rb:87:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/connection.rb:104:in `run_request'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:177:in `put'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_thread.rb:21:in `block in create'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `block in get_thread'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `block in create'

(celluloid):0:in `remote procedure call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/cell_proxy.rb:17:in `_send_'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:41:in `_send_'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/pool_manager.rb:140:in `method_missing'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'

(celluloid):0:in `remote procedure call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/resource.rb:132:in `raw_request'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/resource.rb:123:in `request'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/resources/sandbox_resource.rb:46:in `commit'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'

(celluloid):0:in `remote procedure call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/chef_objects/sandbox_object.rb:53:in `commit'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/resources/cookbook_resource.rb:227:in `upload'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_thread.rb:21:in `block in create'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/thread_handle.rb:13:in `block in initialize'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor_system.rb:32:in `block in get_thread'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/internal_pool.rb:130:in `block in create'

(celluloid):0:in `remote procedure call'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in `value'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/celluloid-0.16.0/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/uploader.rb:54:in `block (2 levels) in upload'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/uploader.rb:50:in `each'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/uploader.rb:50:in `block in upload'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley/client.rb:36:in `open'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ridley-4.0.0/lib/ridley.rb:51:in `open'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf.rb:157:in `ridley_connection'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/uploader.rb:49:in `upload'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/uploader.rb:36:in `run'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/berksfile.rb:542:in `upload'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:208:in `upload'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:52:in `dispatch'

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'

/opt/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:27:in `execute!'

/opt/chefdk/embedded/apps/berkshelf/bin/berks:5:in `<top (required)>'

/opt/chefdk/bin/berks:37:in `load'

/opt/chefdk/bin/berks:37:in `<main>'

I haven't had any luck googling the error for a solution.

Any thoughts?

 - Michael










Archive powered by MHonArc 2.6.16.

§