chef-cookbooks / chef-server Goto Github PK
View Code? Open in Web Editor NEWCookbook to install standalone Chef Server
Home Page: http://supermarket.chef.io/cookbooks/chef-server
License: Apache License 2.0
Cookbook to install standalone Chef Server
Home Page: http://supermarket.chef.io/cookbooks/chef-server
License: Apache License 2.0
yum-chef
recently did a big update change and this is effecting how this works. This dependency is coming from chef-ingredient
. May need to lock that dependency in place until it can be addressed or a version can be bumped.
If this cookbook switched to downloading install.sh and then executing it, it would be able to leverage updates to install.sh which would avoid fixing issues in two places.
This cookbook and the omnibus-updater cookbook both suffer from the problem of having bad, old buggy pure-ruby implementations of install.sh which encounter problems that are solved in install.sh, but which need to get ported.
If there's additional flags and checks that install.sh needs to do for idempotency, then those requirements should get pushed into install.sh
Ohai !
Got this issue after upgrading my standalone server from 12.0.3 to 12.0.7 :
chef/chef#3171
Is it normal that I had to run chef-server-ctl upgrade
by myself after the upgrade ?
Can we plan to add a specific resource to triggger this command when it's needed ?
Thanks !
Hi, I have wrapper chef-server cookbook to install chef server. In the most simple case the default recipe contains only:
include_recipe "chef-server"
include_recipe "chef-server::addons"
include_recipe "#{cookbook_name}::networking"
However my CI run using test kitchen against openstack env. fails. Kitchen is using chef_zero and it actaully allocate the port this cookbook is about to use to deploy chef server.
================================================================================
Error executing action `run` on resource 'execute[chef-server-core-reconfigure]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: [2015-06-11T09:46:00+00:00] INFO: Port 8889 in use: Address already in use - bind(2) for 127.0.0.1:8889
[2015-06-11T09:46:01+00:00] INFO: Started chef-zero at http://localhost:8890 with repository at /opt/opscode/embedded
One version per cookbook
[2015-06-11T09:46:01+00:00] INFO: *** Chef 12.0.3 ***
[2015-06-11T09:46:02+00:00] INFO: Chef-client pid: 6141
[2015-06-11T09:50:11+00:00] INFO: HTTP Request Returned 404 Not Found : Object not found: http://localhost:8890/nodes/defaultubuntu14-nologin-dec3dd1cea55-9cm870r.novalocal
[2015-06-11T09:50:13+00:00] INFO: Setting the run_list to ["recipe[private-chef::default]"] from CLI options
[2015-06-11T09:50:14+00:00] INFO: Run List is [recipe[private-chef::default]]
[2015-06-11T09:50:14+00:00] INFO: Run List expands to [private-chef::default]
[2015-06-11T09:50:14+00:00] INFO: Starting Chef Run for defaultubuntu14-nologin-dec3dd1cea55-9cm870r.novalocal
[2015-06-11T09:50:14+00:00] INFO: Running start handlers
[2015-06-11T09:50:14+00:00] INFO: Start handlers complete.
[2015-06-11T09:50:15+00:00] INFO: HTTP Request Returned 404 Not Found : Object not found: /reports/nodes/defaultubuntu14-nologin-dec3dd1cea55-9cm870r.novalocal/runs
[2015-06-11T09:50:18+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:50:29+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:50:49+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:51:05+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:10+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:19+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:27+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:35+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:47+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T09:52:56+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
...
...
[2015-06-11T10:20:22+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T10:20:24+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T10:20:29+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T10:21:04+00:00] ERROR: Running exception handlers
[2015-06-11T10:21:04+00:00] ERROR: Exception handlers complete
[2015-06-11T10:21:05+00:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
[2015-06-11T10:21:11+00:00] WARN: Cookbook 'local-mode-cache' is empty or entirely chefignored at /opt/opscode/embedded/cookbooks/local-mode-cache
[2015-06-11T10:21:15+00:00] FATAL: NameError: undefined local variable or method `config' for #<Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector:0x00000001f84cf0>
STDERR:
---- End output of chef-server-ctl reconfigure ----
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/chef-server-ingredient/libraries/chef_server_ingredients_provider.rb
74: execute "#{new_resource.package_name}-reconfigure" do
76: end
77: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/chef-server-ingredient/libraries/chef_server_ingredients_provider.rb:74:in `block in <class:ChefServerIngredient>'
execute("chef-server-core-reconfigure") do
action "run"
retries 0
retry_delay 2
default_guard_interpreter :execute
command "chef-server-ctl reconfigure"
backup 5
returns 0
declared_type :execute
cookbook_name "chef-server"
end
================================================================================
Error executing action `reconfigure` on resource 'chef_server_ingredient[chef-server-core]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[chef-server-core-reconfigure] (/tmp/kitchen/cache/cookbooks/chef-server-ingredient/libraries/chef_server_ingredients_provider.rb line 74) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: [2015-06-11T09:46:00+00:00] INFO: Port 8889 in use: Address already in use - bind(2) for 127.0.0.1:8889
[2015-06-11T09:46:01+00:00] INFO: Started chef-zero at http://localhost:8890 with repository at /opt/opscode/embedded
One version per cookbook
Note, mind the:
[2015-06-11T10:21:15+00:00] FATAL: NameError: undefined local variable or method `config' for #<Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector:0x00000001f84cf0>
STDERR:
any suggestions?
chef-server 5.1.0
chef-ingredient 2.0.0
Ensure node can resolve ip isn't functional anymore: https://github.com/chef-cookbooks/chef-server/blob/master/recipes/default.rb#L22 Seems like chef-ingredient has removed: ChefIngredientCookbook::Helpers.fqdn_resolves? https://github.com/chef-cookbooks/chef-ingredient/blob/v1.1.0/libraries/helpers.rb#L244 in the latest version
Try to use recipe[chef-server] with version listed above.
Successful run, Helper function works
Recipe: chef-server::default
* ruby_block[ensure node can resolve API FQDN] action run[2017-03-27T18:39:31+00:00] INFO: Processing ruby_block[ensure node can resolve API FQDN] action run (chef-server::default line 22)
================================================================================
Error executing action `run` on resource 'ruby_block[ensure node can resolve API FQDN]'
================================================================================
NoMethodError
-------------
undefined method `fqdn_resolves?' for ChefIngredientCookbook::Helpers:Module
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/chef-server/libraries/helpers.rb:11:in `api_fqdn_resolves?'
/tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb:26:in `block (2 levels) in from_file'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb
22: ruby_block 'ensure node can resolve API FQDN' do
23: extend ChefServerCookbook::Helpers
24: block { repair_api_fqdn }
25: only_if { api_fqdn_available? }
26: not_if { api_fqdn_resolves? }
27: end
28:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb:22:in `from_file'
ruby_block("ensure node can resolve API FQDN") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
block_name "ensure node can resolve API FQDN"
declared_type :ruby_block
cookbook_name "chef-server"
recipe_name "default"
block #<Proc:0x00000004c04c58@/tmp/kitchen/cache/cookbooks/chef-server/recipes/default.rb:24>
not_if { #code block }
only_if { #code block }
end
Platform:
---------
x86_64-linux
[2017-03-27T18:39:31+00:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2017-03-27T18:39:31+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-03-27T18:39:31+00:00] ERROR: Exception handlers complete
Chef Client failed. 4 resources updated in 14 seconds
https://tickets.opscode.com/browse/CHEF-3889
FATAL: could not create shared memory segment: Invalid argument
2015-05-27_18:57:28.33848 DETAIL: Failed system call was shmget(key=5432001, size=69168054272, 03600).
free -g
251
Hey guys!
I'm walking through this for the first time, trying to stand up my own on-premises chef server using this cookbook and chef-server-populator to get all my Chef server config fully in code.
Coming at this with completely fresh eyes, I'm a little confused with the documentation.
The ReadME.md states that:
addons
Chef addons are premium features that can be installed on the Chef Server with the appropriate license. If there are < 25 nodes managed, or a paid subscription license, addons can be installed.
This recipe iterates through the node['chef-server']['addons'] attribute and installs and reconfigures all the packages listed.
Great! "Where can I find a list of the addons supported in this cookbook?" Where is it appropriate to use something else?
Re: configurations, the ReadME.md states:
Previous versions of this cookbook used configuration as a Hash. This is now deprecated and the configuration should be specified as a String. This must include newlines for each of the configuration items.
Great! "Where can I find an example of configurations used this way? Something a little more involved than setting up the notification email?"
If someone wants to drop some knowledge on me in-ticket, I'm happy to write up a PR for the ReadME.md.
Regards,
Joe Reid
When attempting to execute a kitchen test default-ubuntu-1404
, the VM fails to converge at apt-get -q -y install chef-server-core=12.0.4-1
. Running the command by hand without "-q" shows that the package fails to download.
Currently chef-server is not installable with this cookbook on Ubuntu 14.04 64-bit. It fails with "Could not locate chef-server package matching version 'latest' for node."
I'd fix the error myself but I don't know enough about ruby and chef ... could anybody be so kind and fix this?
Hi,
This cookbook fails when you try to install chef 11 on Ubuntu 14. The reason is obvious because package names for chef12 (chef-server-core) and chef11 (chef-server) are different.
This cookbooks uses chef-server-package
as the package name on the resource provided by `chef-server-ingredient' so no chef11 installation will be possible.
5.0.0
[Operating system distribution and release version. Cloud provider if running in the cloud]
Attempting to modify chef-server attributes and add rabbitmq changes for chef analytics
... another method ...
BACKEND_IP
is the IP address on one of the server's network interfaces:rabbitmq['vip'] = 'BACKEND_IP'
rabbitmq['node_ip_address'] = '0.0.0.0'
chef-server-ctl reconfigure
Chef server is modified such that rabbitmq is listening on the IP specified and oc-id service works for chef analytics
HTTP 502 error messages produced mid-run after rabbitmq['vip']
is modified.
Per analytics_install documentation, the chef-server should be stopped (not sure that's necessary), the chef-server.rb
modified, chef-server reconfigured while offline (chef-server-ctl reconfigure
), then chef-server brought back up (chef-server-ctl restart
), and finally ospcode-manage reconfigured (opscode-manage-ctl reconfigure
).
As of version 0.8.0, the chef-ingredient cookbook has a resource for managing product configuration. We should support this in the default recipe to replace the /etc/opscode/chef-server.rb template, and also allow injecting configuration for addons in the addons recipe.
The configuration should be set as an attribute using the current default configuration that would be rendered without modification.
I believe this will also require a new major release of the cookbook, as it is sure to break compatibility for those who may have wrapper cookbooks that modify the template using the current attributes.
Are there more steps that need to be completed to use this cookbook with chef-solo? I have followed the instructions from the readme without modification and have also tried running from a wrapper cookbook to provide custom chef-server.rb configs and I get the same result. I have tried this with the amazon linux ami and the centos 6 marketplace ami.
5.2.0
12.19.36
Centos 6
chef-solo -o 'recipe[chef-server::default]'
clean ami install of centos 6 from amazon marketplace.
Then directly from the README
curl -L https://www.chef.io/chef/install.sh | sudo bash
sudo mkdir -p /var/chef/cache /var/chef/cookbooks
wget -qO- https://supermarket.chef.io/cookbooks/chef-server/download | sudo tar xvzC /var/chef/cookbooks
for dep in chef-ingredient yum-chef yum apt-chef apt packagecloud compat_resource
do
wget -qO- https://supermarket.chef.io/cookbooks/${dep}/download | sudo tar xvzC /var/chef/cookbooks
done
sudo chef-solo -o 'recipe[chef-server::default]'
I thought it would take defaults and install latest version of chef-server-core with default config.
I receive this error:
Error Resolving Cookbooks for Run List:
x86_64-linux
The download server URL has been deprecated for a long time:
https://github.com/opscode/opscode-omnitruck#deprecated-urls
The cookbook should at least use the metadata URL correctly to download the metadata and parse the s3 url out of it, e.g.:
https://www.opscode.com/chef/metadata-server?v=&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64
Good afternoon,
Since yesterday, I'm facing a problem with the chef-server cookbook.
The cookbook runs well and when it reaches the download chef-server from repository stage, the node starts the download, and fails with a timeout error, as:
efault: * apt_package[chef-server] action install
==> default:
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action install
on resource 'apt_package[chef-server]'
==> default:
==> default: ================================================================================
==> default:
==> default:
==> default:
==> default:
==> default: Mixlib::ShellOut::CommandTimeout
==> default:
==> default: --------------------------------
==> default: Command timed out after 900s:
==> default: Command exceeded allowed execution time, process terminated
==> default: ---- Begin output of apt-get -q -y install chef-server-core=12.2.0-1 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following packages were automatically installed and are no longer required:
==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline
==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli
==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh
==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client
==> default: ruby-sigar ruby-systemu ruby-yajl
==> default: Use 'apt-get autoremove' to remove them.
==> default: The following NEW packages will be installed:
==> default: chef-server-core
==> default: STDERR:
==> default: ---- End output of apt-get -q -y install chef-server-core=12.2.0-1 ----
==> default: Ran apt-get -q -y install chef-server-core=12.2.0-1 returned
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb
==> default:
==> default: 46: declare_resource presource, new_resource.product_name do
==> default: 47: package_name ingredient_package_name
==> default: 48: options new_resource.options
==> default: 49: version install_version if Mixlib::Versioning.parse(version_string(new_resource.version)) > '0.0.0'
==> default: 50: source new_resource.package_source
==> default: 51: timeout new_resource.timeout
==> default: 52: action ingredient_action
==> default: 53: end
==> default: 54: end
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb:46:in package_resource' ==> default: ==> default: apt_package("chef-server") do ==> default: action [:install] ==> default: retries 0 ==> default: retry_delay 2 ==> default: default_guard_interpreter :default ==> default: package_name "chef-server-core" ==> default: version "12.2.0-1" ==> default: declared_type :package ==> default: cookbook_name "chef-server" ==> default: end ==> default: ==> default: ==> default: [2015-09-10T16:16:00+00:00] INFO: Running queued delayed notifications before re-raising exception ==> default: ==> default: ==> default: ================================================================================ ==> default: Error executing action
installon resource 'chef_ingredient[chef-server]' ==> default: ==> default: ================================================================================ ==> default: ==> default: ==> default: ==> default: ==> default: Mixlib::ShellOut::CommandTimeout ==> default: -------------------------------- ==> default: ==> default: apt_package[chef-server] (/var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb line 46) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 900s: ==> default: ==> default: Command exceeded allowed execution time, process terminated ==> default: ---- Begin output of apt-get -q -y install chef-server-core=12.2.0-1 ---- ==> default: STDOUT: Reading package lists... ==> default: ==> default: ==> default: Building dependency tree... ==> default: ==> default: Reading state information... ==> default: ==> default: The following packages were automatically installed and are no longer required: ==> default: ==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline ==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli ==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh ==> default: ==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client ==> default: ruby-sigar ruby-systemu ruby-yajl ==> default: Use 'apt-get autoremove' to remove them. ==> default: The following NEW packages will be installed: ==> default: chef-server-core ==> default: STDERR: ==> default: ==> default: ---- End output of apt-get -q -y install chef-server-core=12.2.0-1 ---- ==> default: ==> default: Ran apt-get -q -y install chef-server-core=12.2.0-1 returned ==> default: ==> default: ==> default: ==> default: Resource Declaration: ==> default: ==> default: --------------------- ==> default: ==> default: # In /var/chef/cache/cookbooks/chef-server/recipes/default.rb ==> default: ==> default: 27: chef_ingredient 'chef-server' do ==> default: ==> default: ==> default: 28: extend ChefServerCoobook::Helpers ==> default: 29: version node['chef-server']['version'] ==> default: ==> default: 30: package_source node['chef-server']['package_source'] ==> default: 31: config <<-EOS ==> default: ==> default: 32: topology "#{node['chef-server']['topology']}" ==> default: 33: #{"api_fqdn \"#{node['chef-server']['api_fqdn']}\"" if api_fqdn_available?} ==> default: 34: #{node['chef-server']['configuration']} ==> default: ==> default: 35: EOS ==> default: 36: action :install ==> default: ==> default: 37: end ==> default: ==> default: 38: ==> default: ==> default: ==> default: ==> default: ==> default: Compiled Resource: ==> default: ==> default: ------------------ ==> default: # Declared in /var/chef/cache/cookbooks/chef-server/recipes/default.rb:27:in
from_file'
==> default:
==> default:
==> default:
==> default: chef_ingredient("chef-server") do
==> default:
==> default: action [:install]
==> default:
==> default: updated true
==> default:
==> default: updated_by_last_action true
==> default:
==> default: retries 0
==> default:
==> default: retry_delay 2
==> default:
==> default: default_guard_interpreter :default
==> default:
==> default: declared_type :chef_ingredient
==> default:
==> default: cookbook_name "chef-server"
==> default: recipe_name "default"
==> default:
==> default: version :latest
==> default:
==> default: config "topology "standalone"\napi_fqdn "vagrant-ubuntu-trusty-64"\n\n"
==> default:
==> default: product_name "chef-server"
==> default: end
==> default:
==> default:
==> default: [2015-09-10T16:16:00+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default:
==> default: Running handlers:
==> default: [2015-09-10T16:16:00+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default:
==> default: [2015-09-10T16:16:00+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 9 resources updated in 988.655551312 seconds
==> default: [2015-09-10T16:16:00+00:00] INFO: Sending resource update report (run-id: 5d590a0a-7958-4824-9171-7774db100bb7)
==> default: [2015-09-10T16:16:01+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-09-10T16:16:01+00:00] ERROR: chef_ingredient[chef-server](chef-server::default line 27) had an error: Mixlib::ShellOut::CommandTimeout: apt_package[chef-server](/var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb line 46) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 900s:
==> default: Command exceeded allowed execution time, process terminated
==> default: ---- Begin output of apt-get -q -y install chef-server-core=12.2.0-1 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following packages were automatically installed and are no longer required:
==> default: chef-zero erubis ohai ruby-diff-lcs ruby-erubis ruby-hashie ruby-highline
==> default: ruby-ipaddress ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli
==> default: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-net-ssh
==> default: ruby-net-ssh-gateway ruby-net-ssh-multi ruby-rack ruby-rest-client
==> default: ruby-sigar ruby-systemu ruby-yajl
==> default: Use 'apt-get autoremove' to remove them.
==> default: The following NEW packages will be installed:
==> default: chef-server-core
==> default: STDERR:
==> default: ---- End output of apt-get -q -y install chef-server-core=12.2.0-1 ----
==> default: Ran apt-get -q -y install chef-server-core=12.2.0-1 returned
==> default: [2015-09-10T16:16:01+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Note: This errors appears either the AWS, or Vagrant machines.
Hi,
Please update the https://github.com/chef-cookbooks/chef-server#bootstrap-chef-server-with-chef-solo guide with required missing cookbook compact_resource. Installation fails without it.
v5.1.0
[vagrant@localhost ~]$ chef-client -v
Chef: 12.14.60
Centos 7 using Atlas box centos/7 (vagrant init centos/7)
Trying to install chef-server cookbook following the installation methods. The guide shows some dependencies to be installed, but required compat_resource cookbook is missing.
# pull down dependency cookbooks
for dep in chef-ingredient yum-chef yum apt-chef apt packagecloud
do
wget -qO- https://supermarket.chef.io/cookbooks/${dep}/download | sudo tar xvzC /var/chef/cookbooks
done
Follow the Bootstrap Chef (server) with Chef (solo) install method
Chef Server up and running.
...
* chef_ingredient[chef-server] action reconfigure
* chef_ingredient_ingredient_config[chef-server] action render
* directory[/etc/opscode] action create (up to date)
* file[/etc/opscode/chef-server.rb] action create (up to date)
(up to date)
* execute[chef-server-core-reconfigure] action run
- execute chef-server-ctl reconfigure
[2016-09-18T15:23:36+00:00] WARN: Skipping final node save because override_runlist was given
Running handlers:
Running handlers complete
Chef Client finished, 9/15 resources updated in 06 minutes 18 seconds
[vagrant@localhost ~]$ sudo chef-solo -o 'recipe[chef-server::default]'
[2016-09-18T15:15:34+00:00] WARN: *****************************************
[2016-09-18T15:15:34+00:00] WARN: Did not find config file: /etc/chef/solo.rb, using command line options.
[2016-09-18T15:15:34+00:00] WARN: *****************************************
[2016-09-18T15:15:34+00:00] WARN: *****************************************
[2016-09-18T15:15:34+00:00] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2016-09-18T15:15:34+00:00] WARN: *****************************************
Starting Chef Client, version 12.14.60
[2016-09-18T15:15:35+00:00] WARN: Run List override has been provided.
[2016-09-18T15:15:35+00:00] WARN: Original Run List: []
[2016-09-18T15:15:35+00:00] WARN: Overridden Run List: [recipe[chef-server::default]]
resolving cookbooks for run list: ["chef-server::default"]
================================================================================
Error Resolving Cookbooks for Run List:
================================================================================
Missing Cookbooks:
------------------
No such cookbook: compat_resource
Expanded Run List:
------------------
* chef-server::default
Platform:
---------
x86_64-linux
Running handlers:
[2016-09-18T15:15:35+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-09-18T15:15:35+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-09-18T15:15:35+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out
[2016-09-18T15:15:35+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-18T15:15:35+00:00] ERROR: 412 "Precondition Failed"
[2016-09-18T15:15:35+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
5.0.0
12.8.1-1
AWS CentOS 6.6 x86_64 w/updates HVM
Install addons using the chef-server::addons recipe
Setting in the node's attributes the following:
{
"fqdn": "chef-01.[REDACTED]",
"chef_client": {
"init_style": "none"
},
"chef-server": {
"addons": [
"manage",
"push-jobs-server",
"reporting"
],
"api_fqdn": "chef-01.[REDACTED]",
"configuration": "nginx['ssl_certificate'] = '/var/chef/ssl/chef-01.[REDACTED].pem'\nnginx['ssl_certificate_key'] = '/var/chef/ssl/chef-01.[REDACTED].key'",
"topology": "standalone"
},
"firewall": {
"allow_established": true,
"allow_ssh": true
},
"system": {
"delay_network_restart": false,
"domain_name": "[REDACTED]",
"manage_hostsfile": true,
"short_hostname": "chef-01"
},
"tags": []
}
Expect all addons to be installed without issue during reconfigure
Reconfiguration presents an error. This is new starting today (2016/04/28)
* chef_ingredient[manage] action reconfigure
* ingredient_config[manage] action render (skipped due to not_if)
* execute[chef-manage-reconfigure] action run
================================================================================
Error executing action `run` on resource 'execute[chef-manage-reconfigure]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of chef-manage-ctl reconfigure ----
STDOUT: To use this software, you must agree to the terms of the software license agreement.
Please view and accept the software license agreement, or pass --accept-license.
STDERR:
---- End output of chef-manage-ctl reconfigure ----
Ran chef-manage-ctl reconfigure returned 1
Resource Declaration:
---------------------
# In /var/chef/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb
105: execute "#{ingredient_package_name}-reconfigure" do
106: command "#{ingredient_ctl_command} reconfigure"
107: end
108: end
Compiled Resource:
------------------
# Declared in /var/chef/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb:105:in `block in <class:ChefIngredient>'
execute("chef-manage-reconfigure") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :execute
command "chef-manage-ctl reconfigure"
backup 5
returns 0
declared_type :execute
cookbook_name :"chef-server"
end
================================================================================
Error executing action `reconfigure` on resource 'chef_ingredient[manage]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[chef-manage-reconfigure] (/var/chef/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb line 105) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chef-manage-ctl reconfigure ----
STDOUT: To use this software, you must agree to the terms of the software license agreement.
Please view and accept the software license agreement, or pass --accept-license.
STDERR:
---- End output of chef-manage-ctl reconfigure ----
Ran chef-manage-ctl reconfigure returned 1
Resource Declaration:
---------------------
# In /var/chef/cookbooks/chef-server/recipes/addons.rb
20: chef_ingredient addon do
21: notifies :reconfigure, "chef_ingredient[#{addon}]"
22: end
23: end
Compiled Resource:
------------------
# Declared in /var/chef/cookbooks/chef-server/recipes/addons.rb:20:in `block in from_file'
chef_ingredient("manage") do
action [:install]
updated true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :chef_ingredient
cookbook_name :"chef-server"
recipe_name "addons"
product_name "manage"
end
I noticed yesterday that my Centos kitchen tests failed when I specified a version of the Chef Server to install. I was able to reproduce by setting a version in the chef-server .kitchen.yml:
I've been asked about this and it seems reasonable to include log rotation in this cookbook. Or, since there are so many logs, maybe a 'chef-server-ctl rotate-logs' command.
I'm using the chef cookbook on a centos6 AMI. I'm getting an error in the rabbitmq cookbook:
https://gist.github.com/jslusher/028dfd88ab24fd9d16d5
It seems that the cookbook isn't installing the erlang properly:
If I try and run the embedded executable for rabbitmqctl by itself, I get this:
/opt/opscode/embedded/bin/rabbitmqctl
/opt/opscode/embedded/bin/rabbitmqctl: line 29: exec: erl: not found
The official instructions say to run "chef-server-ctl upgrade" when upgrading.
http://docs.getchef.com/open_source/upgrade_server_open_source.html#upgrade-to-chef-server-osc-11-1-4-or-higher
This cookbook only runs "chef-server-ctl reconfigure"
Hello,
first I know that debian is not part of the supported OS, but it works and it works great.
Just a small issue with a fresh install under Debian 8.
The folder /usr/lib/systemd/system does not necessary exist on a fresh install of Debian and there is an error in the receipe : /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb
Just creating the folder manually fix the problem :
mkdir /usr/lib/systemd/system
Here the full error output :
Recipe: enterprise::runit_systemd
* template[/usr/lib/systemd/system/private_chef-runsvdir-start.service] action create
* Parent directory /usr/lib/systemd/system does not exist.
================================================================================
Error executing action `create` on resource 'template[/usr/lib/systemd/system/private_chef-runsvdir-start.service]'
================================================================================
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory /usr/lib/systemd/system does not exist.
Resource Declaration:
---------------------
# In /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb
10: template "/usr/lib/systemd/system/#{unit_name}" do
11: owner "root"
12: group "root"
13: mode "0644"
14: variables({
15: :install_path => node[project_name]['install_path'],
16: :project_name => project_name
17: })
18: source "runsvdir-start.service.erb"
19: end
20:
Compiled Resource:
------------------
# Declared in /opt/opscode/embedded/cookbooks/cache/cookbooks/enterprise/recipes/runit_systemd.rb:10:in `from_file'
template("/usr/lib/systemd/system/private_chef-runsvdir-start.service") do
action "create"
retries 0
retry_delay 2
default_guard_interpreter :default
path "/usr/lib/systemd/system/private_chef-runsvdir-start.service"
backup 5
atomic_update true
source "runsvdir-start.service.erb"
variables {:install_path=>"/opt/opscode", :project_name=>"private_chef"}
declared_type :template
cookbook_name "enterprise"
recipe_name "runit_systemd"
owner "root"
group "root"
mode "0644"
end
Running handlers:
[2015-05-27T09:13:53+02:00] ERROR: Running exception handlers
Running handlers complete
[2015-05-27T09:13:53+02:00] ERROR: Exception handlers complete
[2015-05-27T09:13:53+02:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 12 resources updated in 10.986042348 seconds
[2015-05-27T09:13:54+02:00] FATAL: Chef::Exceptions::EnclosingDirectoryDoesNotExist: template[/usr/lib/systemd/system/private_chef-runsvdir-start.service] (enterprise::runit_systemd line 10) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /usr/lib/systemd/system does not exist.
```ย
Thanks :)
I like most of this cookbook, but I don't want it upgrade or downgrade the chef-server once installed. The rest (managing the config, etc.) is handy on its own. The installation part is useful for first-time installs.
Something like an option for "install_if_missing" would be handy.
Hello,
I'm a little confused on how to add addon attributes in the cookbook. What is the format/syntax that the addon attribute should be listed in in the cookbook?
For example, I'm trying to add the 'manage' addon to my Chef Server. I see that the recipe is supposed to iterate through the node.default['chef-server']['addons'] attribute, but what format (how should I have) the addons listed in the code block?
For example, the documentation shows how to configure the Chef Server configuration attributes (shown below), but I don't know how to configure the Addon attributes.
node.default['chef-server']['configuration'] = <<-EOS
notification_email '##########'
api_fqdn '#{node["fqdn"]}'
EOS
For addons, I'm assuming it's in a similar format as shown below, but could someone please guide me on the correct syntax/format for adding an addon attribute?
node.default['chef-server']['addons'] = <<-EOS
#add manage addon here
EOS
Thanks.
Please ignore my error as I know this isn't the right place to report this but this is related to the chef server installation. The initial install on CentOS 6 went fine using chef-solo and this cookbook but "chef-server-ctl install opscode-manage" is failing with an error in the private-chef cookbook which I'm not able to find anywhere on github or supermarket. Any ideas?
Complete stack trace below:
Generated at 2015-12-09 21:33:35 +0000
NoMethodError: yum_package[opscode-manage](private-chef::add_ons_remote line 16) had an error: NoMethodError: undefined method >' for nil:NilClass /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package/yum.rb:1075:in
yum_command'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package/yum.rb:1258:in install_remote_package' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package/yum.rb:1269:in
install_package'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:91:in block (2 levels) in action_install' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:217:in
multipackage_api_adapter'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:90:in block in action_install' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/why_run.rb:52:in
call'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/mixin/why_run.rb:52:in add_action' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider.rb:175:in
converge_by'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider/package.rb:89:in action_install' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/provider.rb:144:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource.rb:589:in run_action' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/runner.rb:49:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/runner.rb:81:in block (2 levels) in converge' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/runner.rb:81:in
each'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/runner.rb:81:in block in converge' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/resource_list.rb:83:in
block in execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/stepable_iterator.rb:116:in call' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/stepable_iterator.rb:116:in
call_iterator_block'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/stepable_iterator.rb:85:in step' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/stepable_iterator.rb:104:in
iterate'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/resource_collection/resource_list.rb:81:in
execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/runner.rb:80:in converge' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:658:in
block in converge'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:653:in catch' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:653:in
converge'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:692:in converge_and_save' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/client.rb:271:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:252:in run_with_graceful_exit_option' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:229:in
block in run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/local_mode.rb:44:in with_server_connectivity' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:212:in
run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application/client.rb:386:in run_application' /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/lib/chef/application.rb:60:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.1/bin/chef-client:26:in <top (required)>' /opt/opscode/embedded/bin/chef-client:23:in
load'
/opt/opscode/embedded/bin/chef-client:23:in `
Because the default recipe only runs the chef-server-ctl reconfigure
with a delayed notification, it's impossible to interact with the installed chef server via another cookbook in the same run list.
/etc/ospcode/pivotal.rb
is not put in place until a reconfigure runs, so other chef-server-ctl commands fail. Effectively, this cookbook can only be used in a standalone scenario.
v5.0.1
12.12.15
Vagrant / bento/ubuntu-16.04
Trying to run the default
recipe
Vagrant.configure("2") do |config|
config.omnibus.chef_version = '12.12.15'
config.vm.define "chef_server" do |chef_server|
chef_server.vm.box = "bento/ubuntu-16.04"
chef_server.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "vendor/cookbooks"
chef.add_recipe "chef-server::default"
end
end
end
The machine successfully goes up
chef-ingredient
fails to find a package for chef-server
.
==> chef_server: RuntimeError
==> chef_server:
==> chef_server: ------------
==> chef_server:
==> chef_server: No package found for 'chef-server' with version 'latest' for current platform in 'stable' channel.
==> chef_server:
==> chef_server: Check that the package exists.
==> chef_server:
==> chef_server: Cookbook Trace:
==> chef_server: ---------------
==> chef_server: /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:95:in `configure_from_channel'
==> chef_server: /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:46:in `configure_package'
==> chef_server: /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:23:in `handle_install'
==> chef_server: /var/chef/cache/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb:54:in `block in <class:ChefIngredient>'
==> chef_server: /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
==> chef_server:
==> chef_server: Resource Declaration:
==> chef_server: ---------------------
==> chef_server: # In /var/chef/cache/cookbooks/chef-server/recipes/default.rb
==> chef_server:
==> chef_server: 29: chef_ingredient 'chef-server' do
==> chef_server: 30: extend ChefServerCookbook::Helpers
==> chef_server: 31: version node['chef-server']['version'] unless node['chef-server']['version'].nil?
==> chef_server: 32: package_source node['chef-server']['package_source']
==> chef_server: 33: config <<-EOS
==> chef_server: 34: topology "#{node['chef-server']['topology']}"
==> chef_server: 35: #{"api_fqdn \"#{node['chef-server']['api_fqdn']}\"" if api_fqdn_available?}
==> chef_server: 36: #{node['chef-server']['configuration']}
==> chef_server: 37: EOS
==> chef_server: 38: action :install
==> chef_server: 39: end
==> chef_server: 40:
==> chef_server:
==> chef_server: Compiled Resource:
==> chef_server: ------------------
==> chef_server: # Declared in /var/chef/cache/cookbooks/chef-server/recipes/default.rb:29:in `from_file'
==> chef_server:
==> chef_server: chef_ingredient("chef-server") do
==> chef_server: action [:install]
==> chef_server: retries 0
==> chef_server: retry_delay 2
==> chef_server: default_guard_interpreter :default
==> chef_server: declared_type :chef_ingredient
==> chef_server: cookbook_name "chef-server"
==> chef_server: recipe_name "default"
==> chef_server: config "topology \"standalone\"\napi_fqdn \"vagrant.vm\"\n\n"
==> chef_server: product_name "chef-server"
==> chef_server: end
==> chef_server:
==> chef_server: Platform:
==> chef_server: ---------
==> chef_server: x86_64-linux
The chef-ingredient is a more appropriate place for these primitives, as they will also be necessary for other "chef server" type cookbooks.
I try to install chef server by using vagrant, the chef-solo provisioner and the chef-server cookbook - a kind of bootstrapping. I'm in an environment that uses a proxy (firewall issue).
I use the following vagrant plugins:
vagrant-berkshelf (2.0.1)
- Version Constraint: >=2.0.1
vagrant-cachier (0.7.2)
vagrant-hosts (2.1.5)
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-proxyconf (1.3.2)
vagrant-share (1.1.0, system)
vagrant-vbguest (0.10.0)
Vagrant runs fine and initializes the solo provisioner:
==> default: Configuring proxy for Apt...
==> default: Configuring proxy for Chef provisioners...
==> default: Configuring proxy environment variables...
==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2014-07-16T12:35:10+00:00] INFO: Forking chef instance to converge...
==> default: [2014-07-16T12:35:10+00:00] DEBUG: Fork successful. Waiting for new chef pid: 9673
==> default: [2014-07-16T12:35:10+00:00] DEBUG: Forked instance now converging
==> default: [2014-07-16T12:35:10+00:00] INFO: *** Chef 11.12.8 ***
==> default: [2014-07-16T12:35:10+00:00] INFO: Chef-client pid: 9673
==> default: [2014-07-16T12:35:10+00:00] DEBUG: Chef-client request_id: 5585bcad-e0b5-4818-b883-d103f32973a6
==> default: [2014-07-16T12:35:12+00:00] DEBUG: Building node object for chefserver
==> default: [2014-07-16T12:35:12+00:00] DEBUG: Extracting run list from JSON attributes provided on command line
==> default: [2014-07-16T12:35:12+00:00] INFO: Setting the run_list to ["recipe[chef-server::default]"] from CLI options
# here some more messages
But then there seems a problem with downloading the package from Omnitruck download-server.
==> default: [2014-07-16T12:35:12+00:00] DEBUG: Found recipe default in cookbook chef-server
==> default: [2014-07-16T12:35:12+00:00] INFO: Omnitruck download-server request: http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=false&nightlies=false
==> default: [2014-07-16T12:35:12+00:00] DEBUG: filtered backtrace of compile error: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:61:in `redirect_target',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:47:in `package_for_version',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/recipes/default.rb:21:in `from_file'
==> default: [2014-07-16T12:35:12+00:00] DEBUG: filtered backtrace of compile error: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:61:in `redirect_target',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:47:in `package_for_version',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/recipes/default.rb:21:in `from_file'
==> default: [2014-07-16T12:35:12+00:00] DEBUG: backtrace entry for compile error: '/tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:61:in `redirect_target''
==> default: [2014-07-16T12:35:12+00:00] DEBUG: Line number of compile error: '61'
==> default:
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/recipes/default.rb
==> default: ================================================================================
==> default:
==> default:
==> default: Errno::ENETUNREACH
==> default: ------------------
==> default: Network is unreachable - connect(2)
==> default:
==> default:
==> default: Cookbook Trace:
==> default:
==> default: ---------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:61:in `redirect_target'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:47:in `package_for_version'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/recipes/default.rb:21:in `from_file'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/chef-server/libraries/omnitruck_client.rb:
==> default:
==> default: 54: def redirect_target(url)
==> default: 55: url = URI.parse(url)
==> default: 56: http = Net::HTTP.new(url.host, url.port)
==> default: 57: if url.scheme == 'https'
==> default: 58: http.use_ssl = true
==> default: 59: http.verify_mode = OpenSSL::SSL::VERIFY_NONE
==> default: 60: end
==> default: 61>> response = http.get(url.request_uri, {})
==> default: 62: case response
==> default: 63: when Net::HTTPRedirection
==> default: 64: response['location']
==> default: 65: else
==> default: 66: nil
==> default: 67: end
==> default: 68: end
==> default: 69: end
==> default: 70:
==> default:
==> default:
==> default: [2014-07-16T12:35:12+00:00] DEBUG: Re-raising exception: Errno::ENETUNREACH - Network is unreachable - connect(2)
I assume it is some proxy issue - although i use vagrant-proxy plugin. As I found out, there is no possibility to configure a proxy for chef solo.
Anybody out there who has an idea on how to handle this issue?
Kind regards
Christian
Hi,
I'm sorry if this is not a right place for my problem.
I switched from self-signed cert to a valid certificate. I stopped Chef Server, change certificate, run 'reconfigure', and then start the server.
I was able to bootstrap a node with its FQDN, the client.pem created but it failed later.
public_name Starting first Chef Client run...
public_name Starting Chef Client, version 12.0.3
public_name [2015-02-25T04:41:15+00:00] ERROR: Server returned error 500 for https://chef.ABCD.com/organizations/ABCD/reports/nodes/internal_name/runs, retrying 1/5 in 4s
public_name [2015-02-25T04:41:19+00:00] ERROR: Server returned error 500 for https://chef.ABCD.com/organizations/ABCD/reports/nodes/internal_name/runs, retrying 2/5 in 8s
public_name [2015
I tracked in the reporting log - /var/log/opscode/opscode-reporting/current
2015-02-25_03:08:13.88725 Undefined:Undefined#Undefined [error] <0.555.0> SSL: certify: ssl_handshake.erl:239:Fatal error: certificate unknown
Does it relate to the different from <public_name> and <internal_name> that making the SSL handshake failed.
Thanks a ton
Good afternoon,
I'm trying to run the chef-server cookbook using chef-provisioning (and chef-solo from Vagrant), and it returning the following error:
================================================================================
Recipe Compile Error in /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb
================================================================================
Chef::Exceptions::ValidationFailed
----------------------------------
common_name is required
Cookbook Trace:
---------------
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:58:in `block in from_file'
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:57:in `from_file'
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:208:in `block in from_file'
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:191:in `each'
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:191:in `from_file'
Relevant File Content:
----------------------
/opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:
51:
52: ssl_keyfile = File.join(nginx_ca_dir, "#{node['private_chef']['nginx']['server_name']}.key")
53: ssl_crtfile = File.join(nginx_ca_dir, "#{node['private_chef']['nginx']['server_name']}.crt")
54: ssl_dhparam = File.join(nginx_ca_dir, 'dhparams.pem')
55:
56: # Generate self-signed SSL certificate
57: openssl_x509 ssl_crtfile do
58>> common_name node['private_chef']['nginx']['server_name']
59: org node['private_chef']['nginx']['ssl_company_name']
60: org_unit node['private_chef']['nginx']['ssl_organizational_unit_name']
61: country node['private_chef']['nginx']['ssl_country_name']
62: key_length node['private_chef']['nginx']['ssl_key_length']
63: expire node['private_chef']['nginx']['ssl_duration']
64: owner 'root'
65: group 'root'
66: mode '0644'
67: end
[2015-09-10T17:10:11+00:00] ERROR: Running exception handlers
[2015-09-10T17:10:11+00:00] ERROR: Exception handlers complete
[2015-09-10T17:10:11+00:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out
[2015-09-10T17:10:13+00:00] FATAL: Chef::Exceptions::ValidationFailed: common_name is required
STDERR: sudo: unable to resolve host ip-10-0-0-151
sudo: unable to resolve host ip-10-0-0-151
sudo: unable to resolve host ip-10-0-0-151
ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
sudo: unable to resolve host ip-10-0-0-151
ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist
---- End output of "bash" "/tmp/chef-script20150910-3220-19gpj5q" ----
Ran "bash" "/tmp/chef-script20150910-3220-19gpj5q" returned 1
These errors started suddenly, and the chef-client cannot run the recipe due this. Note: I've used the wrapper that manages this cookbook (chef-server) before, without problems
The only one attribute passed by wrapper, is:
node.override['chef-server']['api-fqdn'] = node['ipaddress']
Currently, there is no way to provide configuration information for the add-ons. For example, if you want to change the email address from which the management console sends emails, you have to write a custom recipe that either creates the chef_ingredient
resource with the right content in config
or creates an ingredient_config
resource with the same. This complicates the provisioning process. Ideally, the configuration for each add-on could be specified in the attributes, much like how the list of add-ons to install can be specified.
Having the ability to cleanly create a user that has standard admin privs in an org but cannot create orgs would help out when doing org automations.
5.2.0
12.19.36
centos7
Chef a Chef Server (install)
dna.json
{
"fqdn": "hostname.domainname.tld",
"chef_client": {
"init_style": "none"
},
"chef-server": {
"accept_license": true,
"addons": ["manage","push-jobs-server","reporting"],
"api_fqdn": "chef12.anaplan-np.net",
"configuration": "nginx['ssl_certificate'] = '/var/chef/ssl/hostname.domainname.tld'\nnginx['ssl_certificate_key'] = '/var/chef/ssl/hostname.domainname.tld'",
"topology": "standalone",
"version": "12.14.0"
},
"firewall": {
"allow_established": true,
"allow_ssh": true
},
"system": {
"delay_network_restart": false,
"domain_name": "anaplan-np.net",
"manage_hostsfile": true,
"short_hostname": "chef12"
},
"tags": []
}
Required cookbook sync:
sudo rm -rf /var/chef/cookbooks ; sudo mkdir -p /var/chef/cookbooks
sudo rm -rf /var/chef/cache ; sudo mkdir -p /var/chef/cache
sudo rm -rf /var/chef/ssl ; sudo mkdir -p /var/chef/ssl
for DEP in apt apt-chef chef-client ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in chef_handler chef-ingredient ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in compat_resource chef-server ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in chef-sugar cron firewall ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in hostsfile logrotate ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in packagecloud system yum ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
for DEP in yum-chef windows ; do curl -sL https://supermarket.chef.io/cookbooks/${DEP}/download | sudo tar xzC /var/chef/cookbooks; done
sudo chown -R root:root /var/chef
exit 0
Note: Attempts to berks vendor
the chef-server cookbook also resulted in the latest chef-ingredient cookbook download (2.0.1)
Attempt Installation:
sudo chef-solo -j .chef/dna.json -o 'recipe[system::default],recipe[chef-server::default],recipe[chef-server::addons]'
Chef server is installed
aws_instance.chef-server (remote-exec): ================================================================================
aws_instance.chef-server (remote-exec): Error Resolving Cookbooks for Run List:
aws_instance.chef-server (remote-exec): ================================================================================
aws_instance.chef-server (remote-exec): Missing Cookbooks:
aws_instance.chef-server (remote-exec): ------------------
aws_instance.chef-server (remote-exec): Could not satisfy version constraints for: chef-ingredient
aws_instance.chef-server (remote-exec): Expanded Run List:
aws_instance.chef-server (remote-exec): ------------------
aws_instance.chef-server (remote-exec): * system::default
aws_instance.chef-server (remote-exec): * chef-server::default
aws_instance.chef-server (remote-exec): * chef-server::addons
aws_instance.chef-server (remote-exec): Platform:
aws_instance.chef-server (remote-exec): ---------
aws_instance.chef-server (remote-exec): x86_64-linux
aws_instance.chef-server (remote-exec):
aws_instance.chef-server (remote-exec): Running handlers:
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] ERROR: Running exception handlers
aws_instance.chef-server (remote-exec): Running handlers complete
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] ERROR: Exception handlers complete
aws_instance.chef-server (remote-exec): Chef Client failed. 0 resources updated in 01 seconds
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] FATAL: Stacktrace dumped to /etc/chef/local-mode-cache/cache/chef-stacktrace.out
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] ERROR: 412 "Precondition Failed"
aws_instance.chef-server (remote-exec): [2017-04-07T17:41:35+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Root issue: chef-ingredient restriction in this cookbook is set to ~> 1.1
, but ~>
excludes 2.x builds. Either bump to ~> 2.0.0
or remove pessimism
5.0.1
DigitalOcean
Put the 'bootstrap true' in default['chef-server']['configuration'] and run the cookbook
For example:
default['chef-server']['configuration'] = <<-EOS bootstrap true ip_version "ipv4" notification_email "[email protected]" nginx['cache_max_size'] = "3500m" EOS
The cookbook fails to start with an error:
`
================================================================================
Recipe Compile Error in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for true:TrueClass
Cookbook Trace:
---------------
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb:156:in `from_file'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:148:in `block in from_file'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:131:in `each'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/default.rb:131:in `from_file'
Relevant File Content:
----------------------
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/oc_id.rb:
149: only_if { is_data_master? }
150: end
151:
152: component_runit_service "oc_id" do
153: package 'private_chef'
154: end
155:
156>> if node['private_chef']['bootstrap']['enable']
157: execute "/opt/opscode/bin/private-chef-ctl start oc_id" do
158: retries 20
159: end
160: end
161:
162: # Take the existing oc_id.applications (with only a redirect_uri), ensure they
163: # exist in the database, and dump their data to /etc/opscode/oc-id-applications.
164: node['private_chef']['oc_id']['applications'].each do |name, app|
165: oc_id_application name do
Platform:
---------
x86_64-linux
[2017-03-08T15:51:45+00:00] ERROR: Running exception handlers
[2017-03-08T15:51:45+00:00] ERROR: Exception handlers complete
[2017-03-08T15:51:45+00:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2017-03-08T15:51:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-03-08T15:51:45+00:00] FATAL: NoMethodError: undefined method `[]' for true:TrueClass
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 1
[2017-03-08T15:51:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)`
I've been trying to get this working and it only works without this option set in the config.
5.0.1
12.30.37
Ubuntu 12.04 AWS
I am trying to provision a VM with chef-server
[2016-09-01T15:53:48+00:00] INFO: runit_service[oc_id] enabled
[2016-09-01T15:53:50+00:00] INFO: Processing execute[/opt/opscode/bin/private-chef-ctl start oc_id] action run (private-chef::oc_id line 155)
[2016-09-01T15:53:57+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 19 attempt(s) left
[2016-09-01T15:54:03+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 18 attempt(s) left
[2016-09-01T15:54:08+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 17 attempt(s) left
[2016-09-01T15:54:13+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 16 attempt(s) left
[2016-09-01T15:54:17+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 15 attempt(s) left
[2016-09-01T15:54:21+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 14 attempt(s) left
[2016-09-01T15:54:26+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 13 attempt(s) left
[2016-09-01T15:54:30+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 12 attempt(s) left
[2016-09-01T15:54:35+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 11 attempt(s) left
[2016-09-01T15:54:39+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 10 attempt(s) left
[2016-09-01T15:54:44+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 9 attempt(s) left
[2016-09-01T15:54:48+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 8 attempt(s) left
[2016-09-01T15:54:52+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 7 attempt(s) left
[2016-09-01T15:54:57+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 6 attempt(s) left
[2016-09-01T15:55:01+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 5 attempt(s) left
[2016-09-01T15:55:06+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 4 attempt(s) left
[2016-09-01T15:55:10+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 3 attempt(s) left
[2016-09-01T15:55:15+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 2 attempt(s) left
[2016-09-01T15:55:19+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 1 attempt(s) left
[2016-09-01T15:55:24+00:00] INFO: Retrying execution of execute[/opt/opscode/bin/private-chef-ctl start oc_id], 0 attempt(s) left
run
on resource 'execute[/opt/opscode/bin/private-chef-ctl start oc_id]'Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/bin/private-chef-ctl start oc_id ----
STDOUT:
STDERR: /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in run_sv_command_for_service': undefined method
exitstatus' for nil:NilClass (NoMethodError)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:348:in run_sv_command' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:in
block (2 levels) in class:Ctl'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in run' from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in
Resource Declaration:
155: execute "/opt/opscode/bin/private-chef-ctl start oc_id" do
156: retries 20
157: end
158: end
Compiled Resource:
execute("/opt/opscode/bin/private-chef-ctl start oc_id") do
action [:run]
retries 20
retry_delay 2
default_guard_interpreter :execute
command "/opt/opscode/bin/private-chef-ctl start oc_id"
backup 5
returns 0
declared_type :execute
cookbook_name "private-chef"
recipe_name "oc_id"
end
Platform:
x86_64-linux
[2016-09-01T15:55:28+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-09-01T15:55:28+00:00] INFO: template[/var/log/opscode/rabbitmq/config] sending run action to executerestart_rabbitmq_log_service
[2016-09-01T15:55:28+00:00] INFO: Processing execute[restart_rabbitmq_log_service] action run (private-chef::rabbitmq line 19)
[2016-09-01T15:55:29+00:00] INFO: execute[restart_rabbitmq_log_service] ran successfully
[2016-09-01T15:55:29+00:00] INFO: execute[/opt/opscode/embedded/bin/rabbitmq-plugins enable rabbitmq_management] sending restart action to runit_servicerabbitmq
[2016-09-01T15:55:29+00:00] INFO: Processing runit_service[rabbitmq] action restart (private-chef::rabbitmq line 37)
[2016-09-01T15:55:29+00:00] INFO: runit_service[rabbitmq] restarted
[2016-09-01T15:55:29+00:00] INFO: private_chef_pg_cluster[/var/opt/opscode/postgresql/9.2/data] sending restart action to runit_servicepostgresql
[2016-09-01T15:55:29+00:00] INFO: Processing runit_service[postgresql] action restart (private-chef::postgresql line 37)
[2016-09-01T15:55:33+00:00] INFO: runit_service[postgresql] restarted
[2016-09-01T15:55:33+00:00] INFO: template[/var/log/opscode/postgresql/9.2/config] sending run action to executerestart_postgresql_log_service
[2016-09-01T15:55:33+00:00] INFO: Processing execute[restart_postgresql_log_service] action run (private-chef::postgresql line 19)
[2016-09-01T15:55:34+00:00] INFO: execute[restart_postgresql_log_service] ran successfully
[2016-09-01T15:55:34+00:00] INFO: template[/var/opt/opscode/oc_bifrost/sys.config] sending restart action to runit_serviceoc_bifrost
[2016-09-01T15:55:34+00:00] INFO: Processing runit_service[oc_bifrost] action restart (private-chef::oc_bifrost line 37)
[2016-09-01T15:55:35+00:00] INFO: runit_service[oc_bifrost] restarted
[2016-09-01T15:55:35+00:00] INFO: template[/var/log/opscode/oc_bifrost/config] sending run action to executerestart_oc_bifrost_log_service
[2016-09-01T15:55:35+00:00] INFO: Processing execute[restart_oc_bifrost_log_service] action run (private-chef::oc_bifrost line 19)
[2016-09-01T15:55:35+00:00] INFO: execute[restart_oc_bifrost_log_service] ran successfully
[2016-09-01T15:55:35+00:00] INFO: file[/var/opt/opscode/oc_id/config/production.yml] sending restart action to runit_serviceoc_id
[2016-09-01T15:55:35+00:00] INFO: Processing runit_service[oc_id] action restart (private-chef::oc_id line 37)
[2016-09-01T15:55:36+00:00] INFO: runit_service[oc_id] restarted
[2016-09-01T15:55:36+00:00] INFO: template[/var/log/opscode/oc_id/config] sending run action to executerestart_oc_id_log_service
[2016-09-01T15:55:36+00:00] INFO: Processing execute[restart_oc_id_log_service] action run (private-chef::oc_id line 19)
[2016-09-01T15:55:36+00:00] INFO: execute[restart_oc_id_log_service] ran successfully
[2016-09-01T15:55:36+00:00] ERROR: Running exception handlers
[2016-09-01T15:55:36+00:00] ERROR: Exception handlers complete
[2016-09-01T15:55:36+00:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2016-09-01T15:55:36+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-01T15:55:36+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[/opt/opscode/bin/private-chef-ctl start oc_id](private-chef::oc_id line 155) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/opscode/bin/private-chef-ctl start oc_id ----
STDOUT:
STDERR: /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:361:in run_sv_command_for_service': undefined method
exitstatus' for nil:NilClass (NoMethodError)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:348:in run_sv_command' from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:162:in
block (2 levels) in class:Ctl'
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in run' from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:237:in
When open http://hostname/nodes/xxx.novalocal
page will be redirect to a link when loading: 'http://suggest02.yp.com.hk/suggest/en/recommend.aspx?kw=metadata.google.internal&ctype=r&sid=20147160172715127656'
It will happen when node name named as "xxx.novalocal", following code exists in the page code:
<script type='text/javascript'>document.location='http://suggest02.yp.com.hk/suggest/en/recommend.aspx?kw=metadata.google.internal&ctype=r&sid=20147160172715127656'</script>
</body>
chef-server (5.1.0)
Chef Client, version 12.17.44
CentOS release 6.4 (Final)
Trying to use "chef-server-ctl reconfigure" on node after bootstrap it using cookbook "chef-server (5.1.0)"
I got the error :
[2017-01-14T01:58:26-05:00] FATAL: NoMethodError: ruby_block[bootstrap-chef-server-data] (private-chef::bootstrap line 33) had an error: NoMethodError: undefined method `[]' for nil:NilClass
I am trying to build a testing chef server on my own VPS provided by alpharacks CentOS release 6.4 (Final)
I use my local workstation to bootstrap it (using Chef Manage as server) and set your cookbook as its runlist . all looks good .
$ knife bootstrap myip -x archerwang -P mypasswd --sudo -N chefserver -r 'recipe[mychefserver]'
Node chefserver exists, overwrite it? (Y/N) y
Client chefserver exists, overwrite it? (Y/N) y
Creating new client for chefserver
Creating new node for chefserver
Starting the first Chef Client run...
Starting Chef Client, version 12.17.44
[2017-01-14T01:52:49-05:00] WARN: [inet6] no ip address on venet0:0
resolving cookbooks for run list: ["mychefserver"]
Synchronizing Cookbooks:
Running handlers:
Running handlers complete
Chef Client finished, 0/10 resources updated in 46 seconds
Then i run chef-server-ctl reconfigure on my VPS .
below is the error details:
Recipe: private-chef::bootstrap
execute[/opt/opscode/bin/chef-server-ctl start postgresql] action run
execute[/opt/opscode/bin/chef-server-ctl start oc_bifrost] action run
ruby_block[bootstrap-chef-server-data] action run
run
on resource 'ruby_block[bootstrap-chef-server-data]'undefined method `[]' for nil:NilClass**
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:97:in create_superuser_in_erchef' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:50:in
block in bootstrap'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:55:in block in with_service_connection' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:44:in
with_connection'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:52:in with_service_connection' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:49:in
bootstrap'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:35:in `block (2 levels) in from_file'
33: ruby_block "bootstrap-chef-server-data" do
34: block do
35: ChefServerDataBootstrap.new(node).bootstrap
36: end
37: not_if { OmnibusHelper.has_been_bootstrapped? }
38: notifies :restart, 'service[opscode-erchef]'
39: end
40:
ruby_block("bootstrap-chef-server-data") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
block_name "bootstrap-chef-server-data"
declared_type :ruby_block
cookbook_name "private-chef"
recipe_name "bootstrap"
block #Proc:0x00000007a36b08@/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:34
not_if { #code block }
end
x86_64-linux
Running handlers:
[2017-01-14T01:58:26-05:00] ERROR: Running exception handlers
Running handlers complete
[2017-01-14T01:58:26-05:00] ERROR: Exception handlers complete
Chef Client failed. 21 resources updated in 04 minutes 10 seconds
[2017-01-14T01:58:26-05:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
[2017-01-14T01:58:26-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-01-14T01:58:26-05:00] FATAL: NoMethodError: ruby_block[bootstrap-chef-server-data] (private-chef::bootstrap line 33) had an error: NoMethodError: undefined method `[]' for nil:NilClass
[2017-01-14T01:58:26-05:00] FATAL: NoMethodError: ruby_block[bootstrap-chef-server-data] (private-chef::bootstrap line 33) had an error: NoMethodError: undefined method `[]' for nil:NilClass
[root@www html]# more /var/opt/opscode/local-mode-cache/chef-stacktrace.out
Generated at 2017-01-14 01:58:26 -0500
NoMethodError: ruby_block[bootstrap-chef-server-data] (private-chef::bootstrap line 33) had an error: NoMethodError: undefined method []' for nil:NilClass /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:97:in
create_superuser_in_erchef'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:50:in block in bootstrap' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:55:in
block in with_service_connection'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:44:in with_connection' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:52:in
with_service_connection'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:49:in bootstrap' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:35:in
block (2 levels) in from_file'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:35:in call' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:35:in
block in action_run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/mixin/why_run.rb:52:in add_action' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider.rb:176:in
converge_by'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:34:in action_run' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider.rb:145:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource.rb:622:in run_action' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:69:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:in block (2 levels) in converge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:in
each'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:in block in converge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/resource_list.rb:94:in
block in execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:114:in call' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:114:in
call_iterator_block'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:85:in step' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:103:in
iterate'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:55:in each_with_index' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/resource_list.rb:92:in
execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:96:in converge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:670:in
block in converge'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:665:in catch' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:665:in
converge'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:704:in converge_and_save' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:284:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:276:in run_with_graceful_exit_option' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:252:in
block in run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/local_mode.rb:44:in with_server_connectivity' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:235:in
run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application/client.rb:427:in run_application' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:59:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/bin/chef-client:26:in <top (required)>' /opt/opscode/embedded/bin/chef-client:22:in
load'
/opt/opscode/embedded/bin/chef-client:22:in `
Caused by NoMethodError: undefined method
'[]' for nil:NilClass /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:97:in
create_superuser_in_erchef'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:50:inblock in bootstrap' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:55:in
block in with_service_connection'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:44:inwith_connection' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/ec_postgres.rb:52:in
with_service_connection'
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/libraries/chef_server_data_bootstrap.rb:49:inbootstrap' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/bootstrap.rb:35:in
block (2 levels) in from_file'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:35:incall' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:35:in
block in action_run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/mixin/why_run.rb:52:inadd_action' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider.rb:176:in
converge_by'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider/ruby_block.rb:34:inaction_run' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/provider.rb:145:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource.rb:622:inrun_action' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:69:in
run_action'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:inblock (2 levels) in converge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:in
each'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:97:inblock in converge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/resource_list.rb:94:in
block in execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:114:incall' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:114:in
call_iterator_block'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:85:instep' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:103:in
iterate'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/stepable_iterator.rb:55:ineach_with_index' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/resource_collection/resource_list.rb:92:in
execute_each_resource'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/runner.rb:96:inconverge' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:670:in
block in converge'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:665:incatch' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:665:in
converge'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:704:inconverge_and_save' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/client.rb:284:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:276:inrun_with_graceful_exit_option' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:252:in
block in run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/local_mode.rb:44:inwith_server_connectivity' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:235:in
run_chef_client'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application/client.rb:427:inrun_application' /opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/lib/chef/application.rb:59:in
run'
/opt/opscode/embedded/lib/ruby/gems/2.2.0/gems/chef-12.17.17/bin/chef-client:26:in<top (required)>' /opt/opscode/embedded/bin/chef-client:22:in
load'
/opt/opscode/embedded/bin/chef-client:22:in `
Hi,
When trying to run the vagrant server currently. I am getting the below error.
I can see quite a few other people having the same issue on these threads here.(chef-boneyard/chef-dk#106)
Can you advise what the fix is for this as reading through these threads currently its not really clear.
I am using the latest chef-dk currently.
Cheers
Details:
Error:
Installing chef_handler (1.1.6)
E, [2014-11-19T13:54:42.116679 #10488] ERROR -- : Actor crashed!
Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:918:in `connect'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:851:in `start'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:1367:in `request'
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/net/http.rb:1126:in `get'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:78:in `perform_request'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:39:in `call'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/retry.rb:87:in `call'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/ridley-4.1.0/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/ridley-4.1.0/lib/ridley/middleware/follow_redirects.rb:60:in `call'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in `call'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in `get'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/community_rest.rb:119:in `find'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/community_rest.rb:103:in `download'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/downloader.rb:62:in `try_download'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/downloader.rb:36:in `block in download'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/downloader.rb:35:in `each'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/downloader.rb:35:in `download'
C:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/installer.rb:105:in `install'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:63:in `dispatch'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
5.0.1
12.8.1
chef server version is 12.5.0
Ubuntu 14.04
I have something like below in our wrapper cookbook and it was working just fine with chef-ingredient 0.19.0.
node.default['chef-server']['addons'] = [
"sync",
"push-jobs-server",
"manage",
"reporting"]
include_recipe 'chef-server::addons'
However, other cookbooks that installs push-jobs-client
by include_recipe 'push-jobs::default'
started failing with 404 exceptions and I had to upgrade chef-ingredient's dependency to the latest(0.21.2) to fix this issue.
And now, chef-server's sync addon is not found through this cookbook with using v0.21.2 chef-ingredient.
Successfully install chef-sync addon
RuntimeError
------------
No package found for 'sync' with version 'latest' for current platform in 'stable' channel.
Check that the package exists.
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:96:in `configure_from_channel'
/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:46:in `configure_package'
/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:23:in `handle_install'
/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb:54:in `block in <class:ChefIngredient>'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/chef-server/recipes/addons.rb
20: chef_ingredient addon do
21: accept_license node['chef-server']['accept_license'] unless node['chef-server']['accept_license'].nil?
22: notifies :reconfigure, "chef_ingredient[#{addon}]"
23: end
24: end
Hi,
It seems this repository isn't up to date. For my purpose, I try to install a chef-server in a heat stack, but http://www.opscode.com
is not a valid uri and omnitruck raise an exception.
I checked issues and pull requests and it looks like I'm not alone in this situation.
Please can you do some reviews on PR, or add someone you trust to do it.
Regards
I believe this cookbook is basically meant to help with running and maintaining an omnibus-based Chef Server - and run the underlying cookbook located here: https://github.com/opscode/omnibus-chef-server
That repo doesn't have an Issues set up yet, so I;m uncertain as to where to discuss proposed changes to add/change functionality to that cookbook, since this one seems to only pass along an open-ended Hash of configuration options.
I'm trying to chef a server using centos7 in AWS. It's failing on the following:
yum_package[chef-server-core] action install * No version specified, and no candidate version available for chef-server-core ================================================================================ Error executing action
install` on resource 'yum_package[chef-server-core]'
================================================================================
Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for chef-server-core`
Is that because of centos 7 or is there something wrong with the community cookbook?
5.0.0
12.8.1
AWS CentOS 6.7 x86_64
Upgrade chef-server via chef from 12.5.0 to 12.6.0
Utilize chef-server cookbook with specified attributes.json including supermarket and analytics configurations
detect and upgrade as the version is not specified
Fails on config -- difficult to see a 'filesystem space issue'
[centos@chef-01 ~]$ sudo chef-client
Starting Chef Client, version 12.8.1
resolving cookbooks for run list: ["system::default", "chef-client::default", "chef-client::config", "chef-client::cron", "chef-client::delete_validation", "chef-server::default", "chef-server::addons"]
Synchronizing Cookbooks:
- system (0.10.1)
- apt (3.0.0)
- cron (1.7.6)
- hostsfile (2.4.5)
- chef-client (4.5.0)
- logrotate (1.9.2)
- windows (1.40.0)
- chef_handler (1.3.0)
- chef-server (5.0.0)
- chef-ingredient (0.18.4)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 31 resources
Recipe: system::update_package_list
* execute[sync macports tree] action run (skipped due to only_if)
Recipe: cron::default
* yum_package[cronie] action install (up to date)
* service[cron] action enable (up to date)
* service[cron] action start (up to date)
Recipe: system::timezone
* system_timezone[Etc/UTC] action set (up to date)
* log[tz-info (before set): +0000 UTC] action write (skipped due to only_if)
* execute[timedatectl set-timezone Etc/UTC] action run (skipped due to only_if)
* link[/etc/localtime] action create (up to date)
* ruby_block[verify newly-linked timezone] action nothing (skipped due to action :nothing)
Recipe: system::hostname
* system_hostname[chef-01] action set
* execute[run hostname] action run (skipped due to not_if)
* ruby_block[update hostname in /etc/rc.conf] action run (skipped due to only_if)
* hostsfile_entry[127.0.1.1_chef-01] action remove (up to date)
* hostsfile_entry[127.0.0.1_chef-01] action create (up to date)
* hostsfile_entry[10.0.254.204_chef-01] action create (up to date)
* hostsfile_entry[255.255.255.255_chef-01] action create (skipped due to only_if)
* hostsfile_entry[::1_chef-01] action create (up to date)
* hostsfile_entry[fe00::0_chef-01] action create (up to date)
* hostsfile_entry[ff00::0_chef-01] action create (up to date)
* hostsfile_entry[ff02::1_chef-01] action create (up to date)
* hostsfile_entry[ff02::2_chef-01] action create (up to date)
* service[network] action nothing (skipped due to action :nothing)
* execute[run hostname] action nothing (skipped due to action :nothing)
* ruby_block[update network sysconfig] action run (skipped due to not_if)
* ruby_block[show hostnamectl] action nothing (skipped due to action :nothing)
* execute[run hostnamectl] action run (skipped due to only_if)
* execute[run domainname] action nothing (skipped due to action :nothing)
* ruby_block[show host info] action nothing (skipped due to action :nothing)
* file[/etc/hostname] action create (up to date)
* execute[ensure hostname sync'd] action run (skipped due to not_if)
* execute[set rightscale server hostname tag] action run (skipped due to only_if)
Recipe: chef-client::service
* log[Could not determine service init style, manual intervention required to start up the chef-client service.] action write
Recipe: logrotate::default
* yum_package[logrotate] action install (up to date)
* directory[/etc/logrotate.d] action create (up to date)
Recipe: chef-client::config
* template[/etc/logrotate.d/chef-client] action create (up to date)
* directory[/var/run/chef] action create (up to date)
* directory[/var/cache/chef] action create (up to date)
* directory[/var/lib/chef] action create (up to date)
* directory[/var/log/chef] action create (up to date)
* directory[/etc/chef] action create (up to date)
* file[/var/log/chef/client.log] action create (up to date)
* template[/etc/chef/client.rb] action create (up to date)
* directory[/etc/chef/client.d] action create (up to date)
* ruby_block[reload_client_config] action nothing (skipped due to action :nothing)
Recipe: chef-client::cron
* template[/etc/init.d/chef-client] action create (up to date)
* template[/etc/sysconfig/chef-client] action create (up to date)
* service[chef-client] action disable (up to date)
* service[chef-client] action stop (up to date)
* cron_d[chef-client] action delete
* file[legacy named cron.d file] action delete (up to date)
* file[/etc/cron.d/chef-client] action delete (up to date)
(up to date)
* cron[chef-client] action create (up to date)
Recipe: chef-client::delete_validation
* file[/etc/chef/validation.pem] action delete (up to date)
Recipe: chef-server::default
* ruby_block[ensure node can resolve API FQDN] action run (skipped due to not_if)
* chef_ingredient[chef-server] action install
Recipe: <Dynamically Defined Resource>
* chef_gem[mixlib-install] action install (up to date)
- Download chef-server package from https://packages.chef.io/stable/el/6/chef-server-core-12.6.0-1.el6.x86_64.rpm
* ruby_block[stop chef run] action nothing (skipped due to action :nothing)
* remote_file[/var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm] action create (up to date)
* yum_package[chef-server] action install
================================================================================
Error executing action `install` on resource 'yum_package[chef-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
STDOUT:
STDERR: warning: /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
installing package chef-server-core-12.6.0-1.el6.x86_64 needs 291MB on the / filesystem
---- End output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
Ran rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm returned 2
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb
51: package new_resource.product_name do
52: action action_name
53: package_name ingredient_package_name
54: options new_resource.options
55: source local_path || new_resource.package_source
56: provider value_for_platform_family(
57: 'debian' => Chef::Provider::Package::Dpkg,
58: 'rhel' => Chef::Provider::Package::Rpm,
59: 'windows' => Chef::Provider::Package::Windows
60: )
61: if new_resource.product_name == 'chef'
62: # We define this resource in ChefIngredientProvider
63: notifies :run, 'ruby_block[stop chef run]', :immediately
64: end
65: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb:51:in `configure_from_source_package'
yum_package("chef-server") do
package_name "chef-server-core"
provider Chef::Provider::Package::Rpm
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "chef-server"
source "/var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm"
version "12.6.0-1.el6"
end
================================================================================
Error executing action `install` on resource 'chef_ingredient[chef-server]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
yum_package[chef-server] (/var/chef/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
STDOUT:
STDERR: warning: /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
installing package chef-server-core-12.6.0-1.el6.x86_64 needs 291MB on the / filesystem
---- End output of rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm ----
Ran rpm -U /var/chef/cache/chef-server-core-12.6.0-1.el6.x86_64.rpm returned 2
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/chef-server/recipes/default.rb
29: chef_ingredient 'chef-server' do
30: extend ChefServerCookbook::Helpers
31: version node['chef-server']['version'] unless node['chef-server']['version'].nil?
32: package_source node['chef-server']['package_source']
33: config <<-EOS
34: topology "#{node['chef-server']['topology']}"
35: #{"api_fqdn \"#{node['chef-server']['api_fqdn']}\"" if api_fqdn_available?}
36: #{node['chef-server']['configuration']}
37: EOS
38: action :install
39: end
40:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/chef-server/recipes/default.rb:29:in `from_file'
chef_ingredient("chef-server") do
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :chef_ingredient
cookbook_name "chef-server"
recipe_name "default"
config "topology \"standalone\"\napi_fqdn \"chef-01.<<domain.tld>>\"\nnginx['ssl_certificate'] = '/var/chef/ssl/chef-01.<<domain.tld>>.pem'\nnginx['ssl_certificate_key'] = '/var/chef/ssl/chef-01.<<domain.tld>>.key'\nrabbitmq['vip'] = '10.0.254.204'\nrabbitmq['node_ip_address'] = '0.0.0.0'\noc_id['applications'] = {\n 'analytics' => {\n 'redirect_uri' => 'https://analytics-01.<<domain.tld>>/'\n },\n 'supermarket' => {\n 'redirect_uri' => 'https://supermarket-01.<<domain.tld>>/auth/chef_oauth2/callback'\n }\n}\n\n"
product_name "chef-server"
end
Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 09 seconds
It is now considered best practice for cookbook developers to have ChefDK installed at the latest version. It contains the required gems to run test kitchen with vagrant and chefspec for testing this cookbook.
Good evening,
i figured out that when i change the configuration of attribute ['chef-server']['configuration'] the reconfigure is notified only to chef-server and not to the addons that use it.
As a test I have tried to change ldap['system_adjective'] and opscode-manage wasn't reconfigured automatically. (Maybe also the fist opscode-manage-ctl reconfigure is missing)
Since ['chef-server']['configuration'] turns out to be a very long sting '\n' separated maybe it could be splitted in single elements with specified the service they must notify or in chunks.
thanks in advance
Luca
The base box at https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_provisionerless.box is no longer available.
5.0.1
12.15.19
RedHat 7.0 (IPv6 disabled), running on VMware vSphere 5.5
Using chef-provisioning to provision a new VM and install a standalone Chef server instance.
Disable IPv6 on the node (echo "net.ipv6.conf.default.disable_ipv6 = 1" >>/etc/sysctl.conf
) and run the default recipe.
The chef run completes without error.
The following error is logged:
[2016-11-02T14:01:53+00:00] ERROR: chef_ingredient[chef-server] (chef-server::default line 29) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[chef-server-core-reconfigure] (/var/chef/cache/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb line 105) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process
to exit with [0], but received '1'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: [2016-11-02T14:01:52+00:00] FATAL: Errno::EADDRNOTAVAIL: Cannot assign requested address - bind(2) for [::1]:8889
STDERR:
---- End output of chef-server-ctl reconfigure ----
Ran chef-server-ctl reconfigure returned 1
[2016-11-02T14:01:53+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Some research has left me unsure as to whether this is an issue with this cookbook or with omnibus-ctl as, from what I understand, this is what is being used when invoking 'chef-server-ctl reconfigure' - either way I'm unsure as to if/how I can change this behaviour.
Setting the ip_version
chef server configuration setting to ipv4
made no difference to the above behaviour.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.