lochlanna
By:
lochlanna

Chef server on Digital Ocean cannot install

February 19, 2015 4.7k views

I am attempting to setup a chef server (v12) using this guide. I follow it to the letter and have tried on both Ubuntu 14.04 and 12.04.5, I have also tried on Centos 7. Everything works great until I have to create a user. I run the command and it returns ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist.

I then spun up a Ubuntu 14.04 VM on my PC from a vanilla iso and followed the same guide and it works perfectly. I haven't tried on another VPS provider yet however it's strange that it works on the VM but not Digital Ocean.

Has anyone else had this issue or even better does anyone know how to fix it?

2 comments
  • Might be a permission error...after you install the files and such, you might need to change ownership of the files to www-data

    sudo chown -R www-data:www-data /var/www
    
  • I know it's a few months since the question was asked. I also had this problem when running chef-server-ctl user-create ...

    What solved this problem for me was running the command chef-server-ctl ... with sudo. Unless you are logged in as root user (which you probably shouldn't be!), your current user wouldn't have permissions to create the file /etc/opscode/pivotal.rb

    I had a few other problems with the server not starting correctly but the following commands auto-solved the problem and cleaned up any mistakes I made:

    sudo chef-server-ctl reconfigure
    sudo chef-server-ctl restart
    
    edited by asb
1 Answer

This question was answered by @cbrowne:

I know it's a few months since the question was asked. I also had this problem when running chef-server-ctl user-create ...

What solved this problem for me was running the command chef-server-ctl ... with sudo. Unless you are logged in as root user (which you probably shouldn't be!), your current user wouldn't have permissions to create the file /etc/opscode/pivotal.rb

I had a few other problems with the server not starting correctly but the following commands auto-solved the problem and cleaned up any mistakes I made:

sudo chef-server-ctl reconfigure
sudo chef-server-ctl restart

You can see the comment here.

Have another answer? Share your knowledge.