[RESOLVED] Chef-server-ctl reconfigure fails

Hello everyone,

I’m learning Chef at the moment using the Oreily book “Learning Chef”. Iam stuck where it describes to install “private-chef” package using “kitchen” with “vagrant” environment and can not continue.

  1. The error I get is:

ERROR: execute[private-server-ctl reconfigure] (enterprise-chef::default line 20) had an error: Errno::ENOENT: No such file or directory - chef-server-ctl

  1. My default recipe:
    package_url = node[‘enterprise-chef’][‘url’]
    package_name = ::File.basename(package_url) # extracts package name from the URL
    package_local_path = “#{Chef::Config[:file_cache_path]}/#{package_name}”

remote_file package_local_path do
source package_url
end

package package_local_path

execute ‘private-server-ctl reconfigure’


My .kitchen.yml:


driver:
name: vagrant

provisioner:
name: chef_solo

platforms:

  • name: centos65
    driver:
    box: learningchef/centos65
    box_url: learningchef/centos65
    network:
    • [“private_network”, {ip: “192.168.34.33”}]
      customize:
      memory: 1536

suites:

  • name: default
    run_list:
    • recipe[enterprise-chef::default]
      attributes:

When I login on the virtual machine, rpm -q private-chef shows that it is installed but is not done properly because I can not visit the login page: http://192.168.34.33/login

Can you help me please, if you can.
Thank you

Got it

My URL was pointing to a package called “private -chef”. So instead of

execute 'chef-server -ctl reconfigure’
it should have been:
execute ‘private-server-ctl reconfigure’

@goudeuk, thanks for your post!

For me, the below one worked fine!

execute 'private-chef-ctl reconfigure'