I have an ECS cluster with ELB. Last night I saw that a task was stuck in restarting loop. From the service Events log, it said:
"service xxxxx was unable to place a task because no container instance met all of its requirements. The closest matching container-instance xxxxxxxxxxxxxx is already using a port required by your task."
However, I have checked that all such tasks are dead and nothing should be using the port at that time. Updating the service does not help but creating new task definition and then update helps. Terminating the instance and allow ELB to relaunch it helps.
Any idea why the service cannot secure the port for the task?