无法启动Chef-server

时间:2016-09-19 12:56:56

标签: chef

我做的事情,一步一步:

  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. 等待他们安装
  5. sudo chef-server-ctl reconfigure给了我
  6.   

    /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 { {1}}对于nil:NilClass(NoMethodError)
          来自/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:495:in success?
          来自/ opt / opscode / embedded / service / omnibus-ctl / chef-server-ctl:222:run_chef中       来自/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.5.0/lib/omnibus-ctl.rb:736:in reconfigure
          来自/ opt / opscode / embedded / service / omnibus-ctl / chef-server-ctl:237:run

    我的/etc/opscode/chef-server.rb:

      

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

    (同样的错误,即使我将其留空,或将server_name设置为' localhost',' crti-test-vps'或其他)

    服务器托管在DigitalOcean,但还没有域名。

    <main>

    uname -a

1 个答案:

答案 0 :(得分:0)

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.