【问题标题】:Error when configure knife with open source chef server使用开源厨师服务器配置刀时出错
【发布时间】:2013-05-22 17:17:40
【问题描述】:

当我尝试使用以下命令在 AWS CentOS 服务器中配置刀时:

knife configure -i

这是输出:

Where should I put the config file? [/root/.chef/knife.rb] 
Please enter the chef server URL: [http://myserverurl.com:4000] 
Please enter a clientname for the new client: [jim]  
Please enter the existing admin clientname: [chef-webui] 
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem] 
Please enter the validation clientname: [chef-validator] 
Please enter the location of the validation key: [/etc/chef/validation.pem] 
Please enter the path to a chef repository (or leave blank): 
Creating initial API user...

这是错误:

ERROR: Server returned error for http://myserverurl.com:4000/clients, retrying 1/5 in 4s
ERROR: Server returned error for http://myserverurl.com:4000/clients/jim, retrying 1/5 in 3s

更新

我还尝试查看/root/.chef/knife.rb,这是文件的内容:

log_level                :info
log_location             STDOUT
node_name                'jim'
client_key               '/root/.chef/jim.pem'
validation_client_name   'chef-validator'
validation_key           '/etc/chef/validation.pem'
chef_server_url          'http://myserverurl.com:4000'
cache_type               'BasicFile'
cache_options( :path => '/root/.chef/checksums' )

文件 /root/.chef/jim.pem 不存在,它是自动生成的还是我应该创建它。

【问题讨论】:

    标签: chef-infra


    【解决方案1】:

    登录到 Chef 服务器 Web UI 并创建一个客户端。在窗口中,它将显示一个“一次性”私钥,您需要将其复制粘贴到相应的 ~/.chef/client.pem 文件中。

    它似乎正在尝试登录并为您执行此操作但失败了。

    【讨论】:

      【解决方案2】:

      Chef solo 出于某种原因没有启动rabbitmq:

      sudo service rabbitmq-server restart
      

      【讨论】:

        【解决方案3】:

        我正面临着确切的问题。但是我通过关注documentation 解决了这个问题。

        此外,您可能在这里犯了另一个错误,当您运行命令安装 Chef 时,它会要求您提供 Chef 服务器 URL。我在那里做错了。

        如果您使用的是 Amazon EC2,则 Chef 服务器 url 为 http://<your FQDN>: 4000

        请检查您是否正确执行此步骤。是的,您的 FQDN 不是公共 dns。运行主机名命令,你会得到类似 ip: 12-23-344-32 的东西。这是你的 FQDN

        希望这会有所帮助。

        【讨论】:

          最近更新 更多