【问题标题】:Berkshelf::CommunitySiteError when run berks install运行berks install 时出现Berkshelf::CommunitySiteError
【发布时间】:2014-11-11 12:26:38
【问题描述】:

我在运行berks install 时有时会遇到此错误。但有时可以正常运行。这很奇怪。我使用 Berkshelf(3.1.3)。错误是这样的:

E, [2014-07-14T15:36:13.966457 #21077] ERROR -- : Actor crashed!
Berkshelf::CommunitySiteError: An unexpected error occurred retrieving 'limits' (0.2.0) from the cookbook site at ''.
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/community_rest.rb:123:in `find'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/community_rest.rb:100:in `download'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/downloader.rb:53:in `try_download'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/downloader.rb:33:in `block in download'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/downloader.rb:32:in `each'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/downloader.rb:32:in `download'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/berkshelf-3.1.3/lib/berkshelf/installer.rb:101:in `install'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/calls.rb:26:in `public_send'
    /Users/tony/.rvm/gems/An unexpected error occurred retrieving 'dpkg_packages' (0.1.3) from the cookbook site at ''.
ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/calls.rb:26:in `dispatch'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/calls.rb:63:in `dispatch'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/cell.rb:60:in `block in invoke'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/cell.rb:71:in `block in task'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/actor.rb:369:in `block in task'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/tasks.rb:55:in `block in initialize'
    /Users/tony/.rvm/gems/ruby-2.1.1/gems/celluloid-0.16.0.pre2/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'

而我的Berkshelf 是:

source "https://api.berkshelf.com"

cookbook 'users', '~> 1.7.0'
cookbook 'sudo', '~> 2.6.0'
cookbook 'chef-solo-search', '~> 0.5.1'
cookbook 'build-essential', '~> 2.0.4'

cookbook 'openssl', '~> 2.0.0'
cookbook 'hostname', '~> 0.3.0'
cookbook 'apt', '~> 2.4.0'
cookbook 'limits', '~> 0.2.0'
cookbook 'dpkg_packages', '~> 0.1.3'

如何解决这个问题?提前致谢。

【问题讨论】:

  • 这个问题似乎是题外话,因为它是关于已在 HEAD 上报告并修复的软件中的错误。

标签: chef-infra chef-solo berkshelf berksfile


【解决方案1】:

这似乎是 Berkshelf 3.1.3 中的一个错误,即 fixed in 3.1.4

bundle update berkshelf

应该从您的 Chef 目录中修复它,或者将 Berkshelf 修复为:

gem 'berkshelf', '>= 3.1.4'

【讨论】:

    【解决方案2】:

    这个问题已经在这个 PR 中解决了:https://github.com/berkshelf/berkshelf/pull/1258 但它没有添加到宝石中。目前,这可以通过使用它的 git repo 来解决

    gem 'berkshelf', git: 'git://github.com/berkshelf/berkshelf.git'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-28
      • 2018-01-09
      • 1970-01-01
      • 2015-03-15
      • 2018-04-25
      • 2018-08-17
      • 2016-06-01
      • 1970-01-01
      相关资源
      最近更新 更多