Step fails with "Resource is not in the state servicesStable" but new task is running successfully in ECS
See original GitHub issueI’ve defined a aws-actions/amazon-ecs-deploy-task-definition@v1
step on my workflow file, and that step keeps failing:
Run aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: /home/runner/work/_temp/task-definition-31660kV60ttYXRWu.json
service: my-service-staging
cluster: my-cluster
wait-for-service-stability: true
env:
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
AWS_DEFAULT_REGION: us-east-2
AWS_REGION: us-east-2
JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.242/x64
JAVA_HOME_8.0.242_x64: /opt/hostedtoolcache/jdk/8.0.242/x64
##[error]Resource is not in the state servicesStable
##[error]Node run failed with exit code 1
The step hangs for a good 5-10 minutes meanwhile, in ECS I can verify that I have 2 tasks in the RUNNING
state: the old one and the new one.
After a while, the step fails, but the application is successfully updated in ECS.
It seems that the step times out while waiting for the service to reach a stable state, which is a desired count of 1. But I’m not 100% sure.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Amazon ECS with GitHub Actions Stuck on Deploying ECS ...
I had a similar error (Error: Resource is not in the state servicesStable) that was solved after I increased the memory on my...
Read more >Stop an Amazon ECS service from failing to stabilize in AWS ...
A service created in Amazon ECS fails to stabilize if it isn't in the state specified by the AWS CloudFormation template.
Read more >aws_ecs_service | Resources | hashicorp/aws
Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically...
Read more >5 Steps: Using Amazon ECS Exec to pass through Fargate ...
Today I was chasing the information of AWS Pi Week to celebrate AWS 15th Anniversary for S3 Birthday, but I am also very...
Read more >ecs - Go Packages
This happens when any of your container instances are in the DRAINING state if the service contains tasks using the EC2 launch type....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ahmednkhan24 you’ll need to look at your service in the ECS console to determine why the deployment did not succeed. For example, look at the Events tab, and look under “Stopped” tasks in the Tasks tab.
Hi, I am trying to deploy a simple node API (found here), and I seem to be getting a similar error when trying to use the GithubActions workflow.
I haven’t set up a Load Balancer since it was a demo application, so I was wondering if there could be another solution to fixing this failed build?
As you can see, the build hung for around 30 minutes: