1

刀食谱上传“食谱名称”

我收到以下错误。

ubuntu@mychefclient:~/chef-repo$ knife cookbook upload redis
Uploading redis        [0.1.0]
/opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `initialize': getaddrinfo: Temporary failure in name resolution (SocketError)
        from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `open'
        from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `block in connect'
        from /opt/chef/embedded/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
        from /opt/chef/embedded/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
        from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `connect'
        from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
        from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:745:in `start'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/cookbook_uploader.rb:151:in `block in uploader_function_for'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/cookbook_uploader.rb:25:in `call'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/cookbook_uploader.rb:25:in `block (3 levels) in setup_worker_threads'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/cookbook_uploader.rb:24:in `loop'
        from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.2/lib/chef/cookbook_uploader.rb:24:in `block (2 levels) in setup_worker_threads'
4

1 回答 1

0

发生这种情况是因为刀无法访问 Chef 服务器。请确保您可以访问服务器(尝试 ping 和远程登录)。这很可能是本地网络问题。

于 2013-11-28T19:27:11.683 回答