Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ECS: Task fails to start #30680

Closed
Smotrov opened this issue Jun 26, 2024 · 5 comments
Closed

ECS: Task fails to start #30680

Smotrov opened this issue Jun 26, 2024 · 5 comments
Assignees
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@Smotrov
Copy link

Smotrov commented Jun 26, 2024

Describe the bug

I used to deploy my AWS ECS code with CDK with no problem.
All of a sudden yesterday all tasks couldn't start. It shows Stopped status with following message on hover CannotPullContainerError: unsupported media type application/vnd.in-toto+json.

Is it fixable somehow? Now could not deploy anything.

Expected Behavior

Proper deployment

Current Behavior

Can't deploy outdates on ECS

Reproduction Steps

Hard to reproduce

Possible Solution

No response

Additional Information/Context

Before this deployment cdk deploy --all randomly fails with following error

failed commit on ref "manifest-sha256:851e5bb7dcd97948bd32720606df510feebee3ee9404e4db5e1ed00529803920": unexpected status from PUT request to https://408064982279.dkr.ecr.eu-west-1.amazonaws.com/v2/cdk-hnb659fds-container-assets-408064982279-eu-west-1/manifests/2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024: 400 Bad Request
EStreamingProcessor:  fail: docker push 408064982279.dkr.ecr.eu-west-1.amazonaws.com/cdk-hnb659fds-container-assets-408064982279-eu-west-1:2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024 exited with error code 1: failed commit on ref "manifest-sha256:851e5bb7dcd97948bd32720606df510feebee3ee9404e4db5e1ed00529803920": unexpected status from PUT request to https://408064982279.dkr.ecr.eu-west-1.amazonaws.com/v2/cdk-hnb659fds-container-assets-408064982279-eu-west-1/manifests/2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024: 400 Bad Request

 ❌ Deployment failed: Error: Failed to publish asset 2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024:408064982279-eu-west-1
    at Deployments.publishSingleAsset (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:11645)
    at async Object.publishAsset (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:197644)
    at async /opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:181545
[18:47:26] Reading cached notices from /Users/smotrov/.cdk/cache/notices.json

Failed to publish asset 2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024:408064982279-eu-west-1
[18:47:26] Error: Failed to publish asset 2974a6651b65171af5a4efae98ae091a3faf4ef209d848d6a5db6ec4af5c0024:408064982279-eu-west-1
    at Deployments.publishSingleAsset (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:11645)
    at async Object.publishAsset (/opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:197644)
    at async /opt/homebrew/lib/node_modules/aws-cdk/lib/index.js:454:181545

Right after this cdk deploy --all has no errors except not starting tasks.

CDK CLI Version

2.147.1 (build d3695d4)

Framework Version

No response

Node.js Version

v18.20.2

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

@Smotrov Smotrov added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 26, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Jun 26, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 26, 2024
@khushail khushail self-assigned this Jun 26, 2024
@khushail
Copy link
Contributor

khushail commented Jun 26, 2024

@Smotrov , thanks for reporting this. Did anything change from your side between successful deployment to failed one ? I mean any packages update or in the code ? Also you mentioned that it is not reproducible so that means it occurred one time ? Could you please share the synthesized template and logs ??

@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jun 26, 2024
@khushail
Copy link
Contributor

normally this error "CannotPullContainerError" would occur in these circumstances as mentioned here in this doc -
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html

This sage post might be helpful in further understanding as to why you are getting the error - https://repost.aws/knowledge-center/ecs-task-stopped

Let me know if this is helpful.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 26, 2024
@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 26, 2024
@Smotrov
Copy link
Author

Smotrov commented Jun 26, 2024

Thank you fixed with Docker desktop reset / reinstall.

@Smotrov Smotrov closed this as completed Jun 26, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@aws-cdk-automation
Copy link
Collaborator

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

@aws aws locked as resolved and limited conversation to collaborators Jul 25, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants