【发布时间】:2014-07-18 07:45:08
【问题描述】:
我正在尝试按照这些说明在 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访问服务器。
【问题讨论】:
标签: configuration installation ubuntu-12.04 chef-infra