当我尝试使用以下命令在 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 不存在,它是自动生成的还是我应该创建它。