ChefServer - 服务器返回错误502

时间:2015-11-06 11:07:28

标签: linux server chef sles

我在Chef服务器配置期间遇到问题。 当我第一次安装Chef服务器时,一切顺利。现在,因为我需要做一些测试,当我卸载Chef服务器并尝试再次安装它并添加新用户时,会发生这种情况:

ERROR: Server returned error 502 for https://127.0.0.1/users/, retrying 1/5 in 4s
ERROR: Server returned error 502 for https://127.0.0.1/users/, retrying 2/5 in 5s
^C/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:218:in `system': Interrupt
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:218:in `run_command'
    from (eval):42:in `block (2 levels) in load_file'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:190:in `call'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:190:in `block in add_command_under_category'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.4.2/lib/omnibus-ctl.rb:661:in `run'
    from /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl:192:in `<main>'

可能值得一提的是,当我删除Chef服务器时,我会这样做:

chef-server-ctl uninstall
rm -rf /etc/chef
rm -rf /etc/opscode
rm -rf /opt/opscode
rpm -e chef-server-core-12.2.0-1.el5

我正在使用SLES 11 SP1

感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

我找到了如何完全卸载Chef并且还能够成功安装它:

chef-server-ctl uninstall
rpm -qa | grep chef
rpm -e chef-server-12.2.1-pipapo
rm -rf /root/.chef
rm -rf /etc/opscode
rm -rf /opt/opscode
rm -rf /var/opt/opscode
rcapache2 restart

此时如果您想要添加用户或执行chef-server-ctl test,您可能会收到如下错误:

ERROR: Errno::ECONNRESET: Connection reset by peer - SSL_connect

要解决此问题,请再次重新启动apache2并重试。

我希望它可以帮到你!