Reputation: 337
I have created a ECS service to deploy a spring-boot application. I have added the target group to Network load balancer by specifying the load balancer name while creating container for this service in aws ecs console.
Now When I check the health status of that target group it is continuously doing registration and deregistration with different IP addresses. I checked the security group also, it has allowed all ports and IPs.
Can anybody help here what could be the issue of not coming "healthy" status of the target group.
Please find attached screenshot of ECS service, health check status and security group used.
Upvotes: 4
Views: 8429
Reputation: 6265
As discussed over comments, here is the issue with your setup.
8080
port so ECS Task Definition Container Port
should be 8080(not 10001).Container Port
& Target Group
port should be in sync irrespective of Host Port
or NLB Listener Port
. So re-create the Target Group with Port as 8080 and re-create the ECS service attached to updated Target Group.ALB(Application Load Balancer)
instead of NLB
. NLB works for all the TCP ports but you will get more advantages of using ALB for HTTP/HTTPS based traffic. I am not sure of your application fully so its a mere suggestion!!.Upvotes: 6