0

伯克斯上传 -d 给出:

There was an error connecting to the Chef Server

Chef Development Kit Version: 2.4.17
berks version: 6.3.1

这是我的 config.json

{
    "chef": {
        "chef_server_url": "<insert Chef server url here>"
                },
    "ssl": {
        "verify": false 
    }
}

错误信息:

    :~/code/chef-repo/cookbooks/myhaproxy$ berks upload -d
I, [2018-03-10T07:34:42.966812 #6015]  INFO -- : Checking if lockfile is trusted
D, [2018-03-10T07:34:42.966938 #6015] DEBUG -- : Checking myhaproxy (>= 0.0.0)
D, [2018-03-10T07:34:42.967738 #6015] DEBUG -- : Using 'chefignore' at '/home/sid/code/chef-repo/cookbooks/myhaproxy/chefignore'
D, [2018-03-10T07:34:43.025571 #6015] DEBUG -- :   Detected there is a cached cookbook
D, [2018-03-10T07:34:43.026271 #6015] DEBUG -- :   Checking transitive dependencies for myhaproxy (0.1.0)
D, [2018-03-10T07:34:43.026367 #6015] DEBUG -- :     Checking haproxy (= 2.0.0)
D, [2018-03-10T07:34:43.026593 #6015] DEBUG -- :     Checking transitive dependencies for haproxy (2.0.0)
D, [2018-03-10T07:34:43.026667 #6015] DEBUG -- :       Already checked - skipping
I, [2018-03-10T07:34:44.551086 #6015]  INFO -- : Uploading cookbooks
D, [2018-03-10T07:34:44.551238 #6015] DEBUG -- :   No names given, using all cookbooks
I, [2018-03-10T07:34:44.557384 #6015]  INFO -- : Starting upload
There was an error connecting to the Chef Server
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf.rb:165:in `ridley_connection'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/uploader.rb:50:in `upload'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/uploader.rb:37:in `run'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/berksfile.rb:597:in `upload'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/cli.rb:205:in `upload'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/cli.rb:49:in `dispatch'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/lib/berkshelf/cli.rb:25:in `execute!'
    /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/berkshelf-6.3.1/bin/berks:5:in `<top (required)>'
    /usr/bin/berks:255:in `load'
    /usr/bin/berks:255:in `<main>'
4

1 回答 1

0

您的问题可能出在您的knife.rb 中。尝试运行knife status

于 2018-03-11T23:31:25.970 回答