Error installing the chef management console

Hi,

I am new to chef and am trying to install my first chef-server on CentOS V7.1
while installing the Chef management console following the instructions from
https://learn.chef.io/install-and-manage-your-own-chef-server/linux/install-chef-server/install-chef-server-using-your-hardware/

I am getting following error:

Recipe Compile Error in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb


$ sudo chef-server-ctl install chef-manage
Starting Chef Client, version 12.12.3
resolving cookbooks for run list: [“private-chef::add_ons_wrapper”]
Synchronizing Cookbooks:

  • apt (2.9.2)
  • yum (3.10.0)
  • openssl (4.4.0)
  • runit (1.6.0)
  • chef-sugar (3.3.0)
  • private-chef (0.1.0)
  • enterprise (0.10.1)
  • packagecloud (0.0.18)
    Installing Cookbook Gems:
    Compiling Cookbooks…

================================================================================
Recipe Compile Error in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb

SocketError

getaddrinfo: Name or service not known

Cookbook Trace:

/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:56:in block in from_file' /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:51:ineach’
/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:51:in `from_file’

Relevant File Content:

/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:

49: require 'mixlib/install’
50:
51: node[‘private_chef’][‘addons’][‘packages’].each do |pkg|
52: artifact_info = Mixlib::Install.new(
53: channel: :stable,
54: product_name: pkg.split(/(chef-|opscode-)(.*)/).last,
55: product_version: :latest,
56>> ).detect_platform.artifact_info
57:
58: pkg_file = File.join(addon_path, File.basename(artifact_info.url))
59:
60: remote_file pkg_file do
61: source artifact_info.url
62: checksum artifact_info.sha256
63: end
64: end
65: else

Platform:

x86_64-linux

Running handlers:

  • #Class:0x00000005e3a350::AddonInstallHandler
    Running handlers complete
    Chef Client failed. 0 resources updated in 04 seconds
    [2016-06-29T16:48:27-05:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
    [2016-06-29T16:48:27-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    [2016-06-29T16:48:29-05:00] FATAL: SocketError: getaddrinfo: Name or service not known

Hi Babark,

I’m going to have to ask someone who knows the code better what might have gone wrong here, but here’s how you can work around this in the meantime. The chef-server-ctl install command is just a handy shortcut to download and install the package for you. So you can go here: https://downloads.chef.io/chef-manage/ and download Chef Manage for your system, then install it using the package manager on your system, then pick up with the next step in the tutorial, the chef server and chef manager reconfigures.

Hope that helps,

Mark Mzyk
Chef Engineering Manager

In an update on your error, it looks like the box you tried running the chef-server-ctl install command on failed because it didn’t have outbound internet connectivity, so it couldn’t connect and download the Chef Manage package.

Sorry the error was so opaque. If you follow the work around I posted early that will get you around this issue, or you can open up the box so it has connectivity.

Thanks,

Mark Mzyk
Chef Engineering Manager