开发者社区> 问答> 正文

访问SLB经常报502错误,健康检查经常失败

问题描述:

访问SLB经常报502错误,健康检查经常失败。

解决过程:

1、访问SLB的时候,显示的结果是访问到了50172端口
http://120.25.xx.xx:8888/operations/healthcheck
502 Bad Gateway
The proxy server received an invalid response from an upstream server. Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!
URL:   http://120.25. xx.xx:8888/operations/healthcheck
Server:   slba15s0-g1p1-proxy-st3.cloud.st3
Date:   2015/09/23 17:36:53

2、10.31.xx.aa的主机上使用head命令访问另外一台RS
echo -e "HEAD /operations/healthcheck HTTP/1.0\r\n \r\n\r\n" | nc -s 10.31.xx.aa 10.31.xx.bb 8888
发现有405报错:HTTP/1.1 405 Method Not Allowed
Server: Microsoft-IIS/8.5
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Wed, 23 Sep 2015 09:33:27 GMT
Expires: -1
Pragma: no-cache
Connection: close
Set-Cookie: X-Mapping-ojijljpj=0B9CAAA67D75A56753BD2B28F2FE04F7; path=/
Set-Cookie: X-Mapping-rrsqbjcb=898fb6ea89a3b8cacf2a4879cbedc5e8; path=/; max-age=1200
Allow: GET
X-UA-Compatible: IE=edge
Content-Length: 73

3、SLB http协议健康检查是通过head来访问后端服务器,如果用户在代码中只接受get请求,导致健康检查的时候后端服务器http状态会返回405,就会现异常的情况,需要保证http状态返回200值。

展开
收起
阿里云柳璃 2015-11-23 14:28:43 13586 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
《应用型负载均衡ALB产品解读》 立即下载
阿里云网络-SLB负载均衡产品介绍 立即下载
负载均衡SLB热点问题解答 立即下载