我让自己变成了一个泡菜。
我从数字海洋获得了1核,1GB内存VPS并尝试在盒子上安装厨师服务器,尽管the guide有一些警告,厨师需要至少4个内核和更多内存。
在chef-server-ctl reconfigure
步骤中,我遇到了postgresql错误(如果你很好奇,more here)并错误地按CTRL-C来杀死进程。我注意到几个主厨进程正在运行,甚至重新启动服务器试图杀死它们,但它们仍然存在。
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
....
....
这会占用大量内存,我无法运行其他一些基本过程。我甚至尝试使用chef-server-ctl uninstall
卸载它,但是
/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>'
有关如何解决这个问题的想法吗?
谢谢!
答案 0 :(得分:2)
stop private-chef-runsvdir
OR:
/usr/bin/private-chef-ctl stop
pkill -HUP -P 1 runsv$