【问题标题】:Chef Server within Amazon VPCAmazon VPC 中的 Chef 服务器
【发布时间】:2013-08-08 06:21:08
【问题描述】:

我正在尝试在 VPC 下配置 Chef 服务器。厨师服务器安装在公共子网下的实例上,并且还提供了弹性 VPC IP。 chef-server-ctl reconfigure 运行成功,但是当我尝试从浏览器连接到服务器时,我得到“502 Bad Gateway”

厨师服务器下的Nginx日志显示

2013/08/08 05:49:49 [error] 14051#0: *26 upstream prematurely closed connection while   reading response header from upstream, client: 1xx.72.xx.34, server: ec2-54-2x3-xx-184.us-west-2.compute.amazonaws.com, request: "GET /users/login HTTP/1.1", upstream: "http://127.0.0.1:9462/users/login", host: "54.2x3.xx.184"

我该如何解决这个问题。任何帮助将不胜感激。

【问题讨论】:

  • 您找到解决此问题的方法了吗?可以回答你自己的问题。请不要忘记将答案标记为正确! :)

标签: amazon-web-services chef-infra amazon-vpc


【解决方案1】:

检查您的安全组。 尝试停止服务器上的 iptables。 还要检查服务器上的所有服务是否正常运行。

使用 - chef-server-ctl 状态相同。

【讨论】:

    【解决方案2】:

    我也遇到了这个问题。您必须使用 127.0.0.1 进行主机名解析,而不是您的 VPC 私有 IP。

    sudo hostname "chef.local"
    echo "chef.local" | sudo tee /etc/hostname
    echo -e "127.0.0.1 `hostname` `hostname -s`" |sudo tee -a /etc/hosts
    
    dpkg -i chef.deb
    

    【讨论】:

      猜你喜欢
      • 2012-01-20
      • 1970-01-01
      • 2014-04-06
      • 2013-03-23
      • 1970-01-01
      • 1970-01-01
      • 2012-03-04
      • 2020-06-14
      • 1970-01-01
      相关资源
      最近更新 更多