AWS目标组不健康 - 码头容器

发布于 2025-02-06 10:49:36 字数 1436 浏览 2 评论 0原文

我是AWS的新手,并且在设置Docker容器.NET API方面存在一些问题。 Docker容器构建以允许80& 443。

在添加其他功能之前,我能够通过弹性IP访问容器,但仅通过HTTP而非HTTPS访问。因此,我在53号公路托管区域,带有目标组的负载平衡器和SSL证书中添加。

现在,我无法通过 http https 访问,我的目标小组说它的健康检查是不健康的。

是否有不同的方法来设置目标以使用Docker容器进行健康检查,或者我只是沿途犯了一个错误?

路线53

我使用的路线53带有托管区域,记录设置为:

记录类型: a

路由策略:简单路由

路由流量:别名应用程序和经典负载平衡器

负载平衡器

我的负载平衡器是type 应用程序,我有2个听众:

侦听器1

ID: http:80

安全策略: n/a

ssl证书: n/a

默认值:将重定向到https://#{host}:443/#{path}?query}?强>

听众2

ID: https:443

安全策略: elbsecuritypolicy-2016-08

ssl证书:默认>默认默认

默认值: 转发到目标

目标

,然后我有一个目标。

端口: 443

区域: eu-west-2c

健康状况:不健康

健康状况细节:健康检查失败

健康检查

协议: https

路径:/

端口:交通端口

健康阈值: 5连续健康检查成功

不健康的阈值: 2连续的健康检查失败

超时: 5秒

间隔: 30秒

成功代码: 200

我也有弹性IP,我的实例正在运行Docker容器。

事先感谢您的任何帮助。

I'm new to AWS and am having some issues setting up my Docker Container .net API. The Docker container is built to allows 80 & 443.

I was able to access the container via the elastic IP before I added in the other features, but only through Http not Https. So then I added in the Route 53 Hosted Zone, Load balancer with Target Group, and a SSL Certificate.

Now I cannot access either through http or https, and my target group is saying it's health check is unhealthy.

Is there a different way of setting up the target to do the health checks with a Docker container, or have I just made an error along the way?

Route 53

I am using Route 53 with a hosted zone, with a record set to:

Record Type: A

Routing Policy: Simple Routing

Route Traffic To: Alias to Application and Classic Load Balancer

Load Balancer

My load balancer is type Application, and I have 2 listeners:

Listener 1

ID: Http: 80

Security Policy: N/A

SSL Certificate: N/A

Default: redirecting to HTTPS://#{host}:443/#{path}?#{query}

Listener 2

ID: Https: 443

Security Policy: ELBSecurityPolicy-2016-08

SSL Certificate: Default

Default: Forwarding to target

Target

Then I have a target to my instance.

Port: 443

Zone: eu-west-2c

Health Status: Unhealthy

Health Status Details: Health Checks Failed

Health Checks

Protocol: HTTPS

Path: /

Port: Traffic Port

Healthy Threshold: 5 Consecutive Health Check Success

Unhealthy Threshold: 2 Consecutive Health Check Failures

Timeout: 5 Seconds

Interval: 30 Seconds

Success Codes: 200

I also have an elastic IP, and my instance is running a Docker Container.

Thanks in advance for any assitance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酸甜透明夹心 2025-02-13 10:49:36

您的目标不能为端口:443,除非您的应用程序完全支持HTTPS并具有适当的SSL证书。如果您只有针对域和ALB的SSL,则您的目标可能不是443。您必须仔细检查您的应用程序在实例上侦听哪个端口以及它使用的协议(应该是HTTP,而不是HTTPS)。

Your target can't be Port: 443 unless your application fully supports HTTPS and has proper SSL certificates. If you have only SSL for the domain and ALB, your target probably is not 443. You have to double check what port is your application listening on the instances and what protocol it uses (should be http, not https).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文