AWS-Elb运行状况检查失败,代码为302 [英] Aws-elb health check failing at 302 code

查看:284
本文介绍了AWS-Elb运行状况检查失败,代码为302的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在7070端口(非SSL)上创建了ALB侦听器443和目标组实例

Hi i created ALB listener 443 and target group instance on 7070 port (not-ssl)

我可以毫无问题地访问instanceip:7070,但是 https://elb-dns-name 无法访问..实例运行状况检查也失败,并显示302代码

I can access instanceip:7070 without problem , but with https://elb-dns-name not able to access.. instance health check also failed with 302 code

ALB侦听器端口https和实例是http协议

ALB listener port https and instance is http protocol ,

当我使用 https://dns-name 浏览时,它将重定向到

when i browse with https://dns-name it redirecting to http://elb-dns-name

推荐答案

在执行URL重定向时,您将获得302,任何ELB运行状况检查都将查找成功代码200,以使运行状况检查通过.在ALB中,可以在ELB控制台的运行状况检查下对其进行配置.

you get 302 when performing URL redirection, any ELB Health check will look for success code 200 for the health check to pass. In ALB, this can be configured under health check in the ELB console.

使用控制台修改目标组的运行状况检查设置

To modify the health check settings of a target group using the console

  1. 通过 https://console.aws.amazon.com/ec2/<打开Amazon EC2控制台./a>.
  2. 在导航窗格上的负载平衡"下,选择目标组". 选择目标组.
  3. 在运行状况检查"选项卡上,选择编辑".
  4. 在编辑目标组"页面上,将设置Success Codes修改为302或根据需要,然后选择保存".
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. On the navigation pane, under LOAD BALANCING, choose Target Groups. Select the target group.
  3. On the Health checks tab, choose Edit.
  4. On the Edit target group page, modify the setting Success Codes to 302 or as needed, and then choose Save.

这篇关于AWS-Elb运行状况检查失败,代码为302的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆