大网数据广告活动
服务器运维问答

AWS ECS Fargate Target Group Failing HealthChecks

· 52CE 我爱测

The SpringBoot application is running as an ECS Task in a ECS Service of an AWS Fargate Cluster. The ECS Service is LoadBalanced as such the Tasks spawned by the Services are automatically registered to a target group. I am able …

问题原文

原帖链接 · Wei Minn · CC BY-SA 4.0

The SpringBoot application is running as an ECS Task in a ECS Service of an AWS Fargate Cluster. The ECS Service is LoadBalanced as such the Tasks spawned by the Services are automatically registered to a target group.

I am able to call the Health endpoint via API Gateway => VPC Link => Network ELB => Application ELB => ECS Task, as shown below: Call from Postman

However, the HealthChecks seem to be failing and as such, the tasks are being deregistered continously resulting in totally unusable setup.

ECS Service Events

I have made sure to configure the HealthCheck of the Target Group point towards the right endpoint URL, as shown below: Health Check Settings

I also made sure that the Security Group that the Fargate Tasks belong in allows traffics from the Application Load Balancer, as shown below: Security Group for ECS Tasks

But somehow, the HealthChecks kept failing and the tasks are being deregistered, and I'm very confused!

Your help is much appreciated!

已采纳解答

原帖链接 · Wei Minn · CC BY-SA 4.0

The problem actually is with the Health Check Intervals (30 seconds) and Threshold (2 checks) which is too frequent when the Task is just starting up and is unable to respond to the HTTP request.

So, I increased the interval and the threshold, and everything is fine now!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-03-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。