我在使用Windows 10的Ubuntu中使用VM Virtual box创建的其中一个克隆上安装了Chef服务器。在测试服务器时遇到以下问题:
manideep@manideep-VirtualBox:~$ sudo chef-server-ctl test
[sudo] password for manideep:
Configuring logging...
Creating platform...
Configured URL: https://manideep-VirtualBox
Creating org pedant_testorg_manideep-VirtualBox_2786
/opt/opscode/embedded/service/oc-chef-pedant/lib/pedant/platform.rb:336:in `block in create_org': Bad error code 400 from create org: {"error":["Field 'name' invalid"]} (RuntimeError)
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant/platform.rb:321:in `times'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant/platform.rb:321:in `create_org'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant/platform.rb:123:in `org_from_config'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant/platform.rb:42:in `initialize'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant.rb:79:in `new'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant.rb:79:in `create_platform'
from /opt/opscode/embedded/service/oc-chef-pedant/lib/pedant.rb:58:in `setup'
from ./bin/oc-chef-pedant:10:in `<main>'
答案 0 :(得分:0)
可以是包含大写字母的主机名或任何特殊符号。我在chef-server-ctl测试时遇到了同样的问题,但是我从主机名中删除了 - 。这很有用。
chef中可能有任何配置参数,用于hostname = no uppercase或任何特殊符号。