1
votes

Things I did, step by step:

  1. wget https://packages.chef.io/stable/ubuntu/14.04/chef-server-core_12.8.0-1_amd64.deb
  2. wget https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.17.17-1_amd64.deb
  3. sudo dpkg -i chef*
  4. Wait for them to install
  5. And sudo chef-server-ctl reconfigure gives me

/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:479:in remove_old_node_state: undefined method success? for nil:NilClass (NoMethodError)
from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:495:in run_chef
from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:222:in reconfigure
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 <main>

My /etc/opscode/chef-server.rb:

server_name = "IP.ADD.RES.123"
api_fqdn server_name
bookshelf['vip'] = server_name
nginx['url'] = "http://#{server_name}"
nginx['server_name'] = server_name

(same error even if I leave this empty, or set server_name to 'localhost', 'crti-test-vps' or whatever)

Server is hosted at DigitalOcean and doesn't have a domain name yet.

uname -a:

Linux crti-test-vps 4.4.0-28-generic #47~14.04.1-Ubuntu SMP Fri Jun 24 16:30:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

1
Use a real fqdn, a lot of things won't work with an IP address as server_name. (And so if your system can't resolve properly it's own host name, this will fail also)Tensibai
I tried localhost, hostname --fdqn, same error. It seems like call to system() in omnibus-ctl.rb just return nil or something.nikkey2x2
Does a dig fqdnproperly resolve to something ? Are you running chef-server-ctl as root ?Tensibai
I'm voting to close this question as off-topic because it would be better on Chef mailing list at discourse.chef.ioTensibai
Well after re reading your Q, run sudo chef-server-ctl reconfigure it has to be run as root, as you're using sudo for the package install I bet you're not using it for the chef-server-ctl call, and obvisouly it fails writing at some places on the system.Tensibai

1 Answers

0
votes

I had the exact same issue. Things I made that helped me to resolve the issue:

  1. Turned off nginx sudo service nginx stop - the error still persisted
  2. Turned off apache2 sudo service apache2 stop - the error was gone but sudo chef-server-ctl reconfigure was returning other errors or no output at all (I felt it was random)
  3. Rebooted the server

After rebooting I successfully reconfigured chef. I think the problem may be connected with the amount of free RAM. I had small amount of free RAM before rebooting but I don't remember how much.