When I try run a task in my service using ECS a errors message is displayed
Run tasks failed Reasons : ["RESOURCE:PORTS"]
How can I resolve this issue?
Your Amazon ECS tasks might stop due to a variety of reasons. The most common reasons are: Essential container exited. Failed Elastic Load Balancing (ELB) health checks.
To connect to your container instanceOpen the Amazon ECS console at https://console.aws.amazon.com/ecs/ . Select the cluster that hosts your container instance. On the Cluster page, choose ECS Instances. On the Container Instance column, select the container instance to connect to.
You can use an Amazon ECS task definition to specify multiple containers. All the containers that you specify are deployed along the same compute capacity. Don't use this feature to add multiple application containers to the same task definition because this prevents copies of each application scaling separately.
It looks like the scheduler cannot assign your task to an instance because it requires a fixed port that is already taken. The simplest solution is to choose another port number in the specification of your task.
You could also allow the scheduler to allocate the port dynamically, but in this case you would probably want to define a service attached to a load balancer in order to expose it to the outside world.
I had one instance running and I was ssh'ed into it and got this error.
I logged out and I was able to run the task.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With