How do I kill the chef process on the chef server?

I got myself into a bit of a pickle.

I got a 1-core, 1GB memory VPS from digital ocean and took a shot at installing chef server on the box, even though the guide had a few warnings that chef requires at least 4 cores and more memory.

During the chef-server-ctl reconfigure step, I ran into postgresql errors (if you’re curious, more here) and mistakenly hit CTRL-C to kill the process. I noticed several chef processes running and even restarted the server to try and kill them, but they still persisted.

root@hal:~# ps aux | grep chef
root       597  0.0  0.0   4212    72 ?        Ss   07:39   0:00 runsv opscode-erchef
opscode    611  0.0  0.0   4356    88 ?        S    07:39   0:00 svlogd -tt /var/log/opscode/opscode-erchef
opscode    612  0.7  3.7 534704 38400 ?        Ssl  07:39   0:09 /opt/opscode/embedded/service/opscode-erchef/erts-5.10.4/bin/beam.smp -K true -A 5 -- -root /opt/opscode/embedded/service/opscode-erchef -progname oc_erchef -- -home /var/opt/opscode/opscode-erchef -- -noshell -boot /opt/opscode/embedded/service/opscode-erchef/releases/1.5.0/oc_erchef -embedded -config /opt/opscode/embedded/service/opscode-erchef/etc/app.config -name erchef@127.0.0.1 -setcookie erchef -smp enable -pa lib/patches -- runit
opscode+  1473  0.0  0.4 314352  4520 ?        Ss   07:39   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(52205) idle                 
opscode+  1475  0.0  0.3 313928  3964 ?        Ss   07:40   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(56254) idle                 
opscode+  1477  0.0  0.3 313928  3972 ?        Ss   07:40   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(56509) idle                 
opscode+  1479  0.0  0.4 313928  4152 ?        Ss   07:40   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(56740) idle                 
opscode+  1546  0.0  0.4 313928  4148 ?        Ss   07:40   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(41027) idle                 
opscode+  1563  0.0  0.4 313928  4144 ?        Ss   07:40   0:00 postgres: opscode_chef opscode_chef 127.0.0.1(56678) idle  
....
....

This is hogging so much memory I can’t run some other basic processes. I even tried uninstalling it with chef-server-ctl uninstall but that too failed with

/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:295:in `run_sv_command_for_service': undefined method `exitstatus' for nil:NilClass (NoMethodError)
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:285:in `block in run_sv_command'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:284:in `each'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:284:in `run_sv_command'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:219:in `cleanup_procs_and_nuke'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:256:in `uninstall'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/lib/omnibus-ctl.rb:555:in `run'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.3.1/bin/omnibus-ctl:31:in `<top (required)>'
    from /opt/opscode/embedded/bin/omnibus-ctl:23:in `load'
    from /opt/opscode/embedded/bin/omnibus-ctl:23:in `<main>'

Any thoughts on how to get around this?

Thank you!


Source: ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.