Reputation: 559
I am trying to install chef-server on Ubuntu 12.04 following these instructions.
http://docs.opscode.com/install_server.html
My research has shown me that generally when this error shows it self it is because of the hostname
Here are my host settings:
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
However when I try to configure chef I always get this error:
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)
Than I do:
root@dutches:/home/mrrc# curl http://127.0.0.1:8000/_status
{"status":"fail","upstreams":{"chef_solr":"fail","chef_sql":"pong"}}
Is it because I don't actually own the dutches.com domain? Even if my host file routes it locally? I want to access the server by IP.
Upvotes: 0
Views: 1568
Reputation: 26997
The Chef Server installation requires a valid domain name (for a variety of reasons). You cannot access it by ip address.
Upvotes: 2