【发布时间】:2018-04-04 19:52:29
【问题描述】:
我在 ELB 后面有一个 Ec2/RHEL7。 EC2有Nginx监听80端口,Tomcat监听8080端口。ELB Healthcheck如下
Ping Target
HTTP:80/index.html
Timeout 5 seconds
Interval 30 seconds
Unhealthy threshold 10
Healthy threshold 3
ELB 健康检查不断失败,ec2 停止服务
我已经更新了 ngix conf(在 site-available 和 sites-enabled 下) Nginx 和 tomcat 服务都已启动并运行
我还可以卷曲以下内容(使用 localhost 和主机名通过,但使用 IP 地址失败)
[ec2-user@ip-10-190-180-30 ~]$ curl -I localhost:80/index.html
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 24 Oct 2017 06:05:25 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://localhost/index.html
Strict-Transport-Security: "max-age=31536000; includeSubdomains;"
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: "1; mode=block"
curl -I 10.160.xx.xx:80/index.html
HTTP/1.1 503 Service Unavailable
Server: squid/3.5.20
Mime-Version: 1.0
Date: Tue, 24 Oct 2017 06:07:50 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3659
X-Squid-Error: ERR_CONNECT_FAIL 110
X-Cache: MISS from izss-proxy-a2
X-Cache-Lookup: MISS from izss-proxy-a2:3128
Via: 1.1 izss-proxy-a2 (squid/3.5.20)
Connection: keep-alive
ELB 运行状况检查失败。不知道我错过了什么。
【问题讨论】:
-
发布你的 nginx 配置
标签: tomcat nginx amazon-ec2 amazon-elb