Chef-Server安装时执行[verify-system-status]出现Ubuntu错误



我正在尝试在Ubuntu 12.04上安装chef-server。

http://docs.opscode.com/install_server.html

我的研究表明,当这个错误出现时,通常是因为主机名

这是我的主机设置:

root@dutches:/home/mrrc# cat /etc/hosts
127.0.0.1       chef.dutches.com dutches localhost localhost.localdomain
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

root@dutches:/home/mrrc# cat /etc/hostname
chef.dutches.com
root@dutches:/home/mrrc# hostname -f
chef.dutches.com
root@dutches:/home/mrrc# ping chef.dutches.com
PING chef.dutches.com (127.0.0.1) 56(84) bytes of data.
64 bytes from chef.dutches.com (127.0.0.1): icmp_req=1 ttl=64 time=1.97 ms
64 bytes from chef.dutches.com (127.0.0.1): icmp_req=2 ttl=64 time=0.098 ms
64 bytes from chef.dutches.com (127.0.0.1): icmp_req=3 ttl=64 time=0.079 ms
64 bytes from chef.dutches.com (127.0.0.1): icmp_req=4 ttl=64 time=0.074 ms
^C
--- chef.dutches.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.074/0.557/1.979/0.821 ms

然而,当我尝试配置chef时,我总是得到这个错误:

Recipe: chef-server::bootstrap
  * execute[verify-system-status] action run
================================================================================
Error executing action `run` on resource 'execute[verify-system-status]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '22'
---- Begin output of curl -sf http://127.0.0.1:8000/_status ----
STDOUT:
STDERR:
---- End output of curl -sf http://127.0.0.1:8000/_status ----
Ran curl -sf http://127.0.0.1:8000/_status returned 22

Resource Declaration:
---------------------
# In /opt/chef-server/embedded/cookbooks/chef-server/recipes/bootstrap.rb
 24: execute "verify-system-status" do
 25:   command "curl -sf #{erchef_status_url}"
 26:   retries 20
 27:   not_if { File.exists?(bootstrap_status_file) }
 28: end
 29:

Compiled Resource:
------------------
# Declared in /opt/chef-server/embedded/cookbooks/chef-server/recipes/bootstrap.rb:24:in `from_file'
execute("verify-system-status") do
  action "run"
  retries 0
  retry_delay 2
  guard_interpreter :default
  command "curl -sf http://127.0.0.1:8000/_status"
  backup 5
  returns 0
  cookbook_name :"chef-server"
  recipe_name "bootstrap"
  not_if { #code block }
end


Running handlers:
[2014-07-17T17:01:09-04:00] ERROR: Running exception handlers
Running handlers complete
[2014-07-17T17:01:09-04:00] ERROR: Exception handlers complete
[2014-07-17T17:01:09-04:00] FATAL: Stacktrace dumped to /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 10 resources updated in 70.5072942 seconds
[2014-07-17T17:01:09-04:00] ERROR: execute[verify-system-status] (chef-server::bootstrap line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '22'
---- Begin output of curl -sf http://127.0.0.1:8000/_status ----
STDOUT:
STDERR:
---- End output of curl -sf http://127.0.0.1:8000/_status ----
Ran curl -sf http://127.0.0.1:8000/_status returned 22
[2014-07-17T17:01:10-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

root@dutches:/home/mrrc# curl http://127.0.0.1:8000/_status
{"status":"fail","upstreams":{"chef_solr":"fail","chef_sql":"pong"}}

是因为我并不拥有dutches.com域名吗?即使我的主机文件将它路由到本地?我想通过IP访问服务器

Chef Server安装需要一个有效的域名(出于各种原因)。不能通过ip地址访问

相关内容

最新更新