0

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

Chef服务器下的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"

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

4

2 回答 2

0

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

使用 - chef-server-ctl status 相同。

于 2013-08-09T04:42:11.260 回答
0

我也遇到了这个。您必须使用 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
于 2013-11-21T20:11:50.730 回答