【问题标题】:ChefServer - Server returned error 502ChefServer - 服务器返回错误 502
【发布时间】:2015-11-06 11:07:28
【问题描述】:

我在 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

感谢任何帮助。

【问题讨论】:

  • 安装后是否运行chef-server-ctl reconfigure?
  • 是的,但我想卸载它。我通过尝试几件事找到了答案。
  • 请问您为什么使用chef-server-ctl cleanse 重新安装安装,返回全新安装状态?
  • 我正在编写一个脚本来自动化厨师服务器的安装,所以我必须从头开始做

标签: linux server chef-infra sles


【解决方案1】:

我找到了如何完全卸载 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 并重试。

希望对你有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-29
    • 1970-01-01
    • 2020-11-26
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 2014-12-12
    • 2019-06-07
    相关资源
    最近更新 更多