Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/pandas/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Chef infra 使用开源chef服务器配置刀子时出错_Chef Infra - Fatal编程技术网

Chef infra 使用开源chef服务器配置刀子时出错

Chef infra 使用开源chef服务器配置刀子时出错,chef-infra,Chef Infra,当我尝试使用以下命令在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 t

当我尝试使用以下命令在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服务器web UI并创建客户端。在窗口中,它将显示一个“一次性”私钥,您需要将其复制粘贴到相应的~/.chef/client.pem文件中


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

我正面临着确切的问题。但我通过遵循这个解决了这个问题

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

如果您使用的是AmazonEC2,那么chef服务器url是http://
:4000

请检查此步骤是否正确。是的,您的FQDN不是公共dns。运行hostname命令,您将得到ip:12-23-344-32的排序。这是您的FQDN


希望这能有所帮助。

由于某些原因,厨师长索洛没有启动rabbitmq:

sudo service rabbitmq-server restart