当我尝试在Ubuntu 14.04.5 LTS中安装Chef服务器时,我看到以下错误。我按照以下步骤从Sachin博客中安装了一个厨师服务器。 https://sachinsharm.wordpress.com/tag/chef-server/
sudo apt-get update&& sudo apt-get upgrade
wget https://packages.chef.io/files/stable/chef-server/11.1.7/ubuntu/12.04/chef-server_11.1.7-1_amd64.deb
dpkg -i chef-server-core _ * .deb
rm chef-server-core _ * .deb
chef-server-ctl reconfigure
chef-server-ctl restart
我的/ etc / hosts文件包含我的主机名。
127.0.0.1 localhost howareu 127.0.1.1 howareu 172.25.150.19 howareu localhost
错误日志 -
root@Jenkins:~# chef-server-ctl reconfigure
the ffi-yajl and yajl-ruby gems have incompatible C libyajl libs and should not be loaded in the same Ruby VM
falling back to ffi which might work (or might not, no promises)
[2017-10-16T17:17:39+05:30] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:
knife ssl check -c /opt/chef-server/embedded/cookbooks/solo.rb
Starting Chef Client, version 11.12.2
Compiling Cookbooks...
Recipe: chef-server::default
* directory[/etc/chef-server] action create (up to date)
[2017-10-16T17:17:41+05:30] WARN: Cloning resource attributes for execute[/opt/chef-server/bin/chef-server-ctl start postgresql] from prior resource (CHEF-3694)
[2017-10-16T17:17:41+05:30] WARN: Previous execute[/opt/chef-server/bin/chef-server-ctl start postgresql]: /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb:128:in `from_file'
[2017-10-16T17:17:41+05:30] WARN: Current execute[/opt/chef-server/bin/chef-server-ctl start postgresql]: /opt/chef-server/embedded/cookbooks/chef-server/recipes/postgresql.rb:175:in `from_file'
[2017-10-16T17:17:42+05:30] WARN: Cloning resource attributes for directory[/var/opt/chef-server/chef-server-webui/etc] from prior resource (CHEF-3694)
[2017-10-16T17:17:42+05:30] WARN: Previous directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/recipes/chef-server-webui.rb:31:in `block in from_file'
[2017-10-16T17:17:42+05:30] WARN: Current directory[/var/opt/chef-server/chef-server-webui/etc]: /opt/chef-server/embedded/cookbooks/chef-server/definitions/unicorn_config.rb:21:in `block in from_file'
Generating RSA private key, 2048 bit long modulus
.......+++
.............................................................+++
e is 65537 (0x10001)
Converging 216 resources
* directory[/etc/chef-server] action nothing (skipped due to action :nothing)
Recipe: chef-server::users
* user[chef_server] action create (up to date)
* group[chef_server] action create (up to date)
Recipe: chef-server::default
* directory[/etc/chef] action create (up to date)
* directory[/var/opt/chef-server] action create (up to date)
Recipe: runit::upstart
* execute[initctl stop opscode-runsvdir] action run (skipped due to only_if)
* file[/etc/init/opscode-runsvdir.conf] action delete (up to date)
* cookbook_file[/etc/init/chef-server-runsvdir.conf] action create (up to date)
* execute[initctl status chef-server-runsvdir] action run
- execute initctl status chef-server-runsvdir
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:
[2017-10-16T17:18:30+05:30] ERROR: Running exception handlers
Running handlers complete
[2017-10-16T17:18:30+05:30] ERROR: Exception handlers complete
[2017-10-16T17:18:30+05:30] FATAL: Stacktrace dumped to /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 12 resources updated in 51.2651677 seconds
[2017-10-16T17:18:30+05:30] 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
[2017-10-16T17:18:30+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)