【问题标题】:Chef-Server Installation Ubuntu Error on execute[verify-system-status]Chef-Server 安装 Ubuntu 执行时出错 [verify-system-status]
【发布时间】: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


    【解决方案1】:

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

    【讨论】:

    • 嗯.. 好的,谢谢,我将尝试使用我拥有的域。成功后将接受答案。
    • 我修改它以使用有效的域名。当我从其他位置 ping 域时,它会解析为正确的 IP 地址。但是我仍然遇到同样的错误。
    • 当我从服务器内部 ping 到 127.0.0.1 时。这是预期的行为还是我应该修改主机文件以 ping 到服务器的公共 IP?
    • 更改域名后需要运行private-chef-ctl reconfigure
    • 找不到命令。您指的是 chef-server-ctl reconfigure 吗?因为我运行了它并得到了与原始帖子相同的错误。
    猜你喜欢
    • 1970-01-01
    • 2015-07-11
    • 2021-04-11
    • 1970-01-01
    • 2012-06-12
    • 1970-01-01
    • 2020-09-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多