【问题标题】:Chef workstation error厨师工作站错误
【发布时间】:2015-02-25 13:58:48
【问题描述】:

我之前已经设置了厨师服务器和工作站,为其配置了节点,运行食谱并在厨师上工作。但是最近我一直面临这个问题,这几天一直困扰着我。

当我运行设置工作站的命令时,

knife configure -i

提示要求我们输入 pem 文件位置和服务器 FQDN 等详细信息。

以下是错误:

[root@chef-server .chef]# knife configure -i
Overwrite /root/.chef/knife.rb? (Y/N) Y
Please enter the chef server URL: [https://myserver.example.com:443]
Please enter a name for the new user: [root] anyuser
Please enter the existing admin name: [admin]
Please enter the location of the existing admin's private key: [/etc/chef-server/admin.pem] ~/.chef/admin.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem] ~/.chef/chef-validator.pem
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Please enter a password for the new user:
ERROR: Service temporarily unavailable
/opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:325:in `stream_check': undefined method `closed?' for nil:NilClass (NoMethodError)
        from /opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:199:in `read_body'
        from /opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:226:in `body'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:502:in `rescue in format_rest_error'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:500:in `format_rest_error'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:480:in `humanize_http_exception'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:430:in `humanize_exception'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:421:in `rescue in run_with_pretty_exceptions'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:412:in `run_with_pretty_exceptions'
        from /opt/chef/embedded/apps/chef/lib/chef/knife.rb:213:in `run'
        from /opt/chef/embedded/apps/chef/lib/chef/application/knife.rb:139:in `run'
        from /opt/chef/embedded/apps/chef/bin/knife:25:in `<top (required)>'
        from /usr/bin/knife:40:in `load'
        from /usr/bin/knife:40:in `<main>'

这是痕迹。 谢谢。

【问题讨论】:

  • 如果这是一个新的 Chef Server,您应该真的使用 Chef Server 12,尤其是刀配置与 Chef Server 12 不兼容。
  • @coderanger :link 请检查链接,我在使用 Chef 12 时也遇到过问题。

标签: chef-infra


【解决方案1】:

有时由于代理而发生此错误。
只需取消设置代理:

unset http_proxy
unset https_proxy 

【讨论】:

    【解决方案2】:

    您使用的是什么版本的厨师?我想知道您是否遇到CHEF-4010 注册新用户的问题。 (刀命令的“-i”参数)。

    作为 Chef Server 11 的解决方法,我建议在您的 Chef 服务器上使用预配置的“admin”用户。见:

    【讨论】:

    • 非常感谢,这有帮助,但我想知道这个错误是什么以及解决问题的方法。而不是刀提示的参数,我们使用自己的参数。我想知道它是如何没有提示输入导致问题的密码。
    • @vikramiyer “-i”参数在 chef 服务器上创建一个新用户。这就是为什么我问您使用的是什么版本的厨师(CHEF-4010 在版本 11.6.0 中修复)。我建议的解决方法使用所有新厨师服务器上存在的“管理员”用户,解释为什么没有提示您输入密码。
    • 很好地解释了! :) 现在,当我尝试将节点(客户端)注册到服务器时,它会引发以下错误。 link
    猜你喜欢
    • 2014-03-09
    • 2013-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-15
    • 1970-01-01
    相关资源
    最近更新 更多