Why this happens
A task that stops shortly after launch points at one of three causes:- The container exits shortly after start. The process crashes, hits an unhandled error during initialisation, or completes and exits when it should keep running.
- The image cannot be pulled. The tag does not exist in the registry, or the pull fails partway through.
- An environment value the application requires is missing, so startup aborts.
ecs_stabilise phase. The provider reason from ECS may include the stopCode for the stopped tasks, which distinguishes an application exit from an image or provisioning problem.
How to fix it
- Check the application logs for the stopped tasks. The final log lines before exit name the cause in most cases.
- Read the stopCode in the provider reason. An essential-container exit points at your application, while an image-pull error points at the tag or registry.
- Run the image locally with the same environment. If it exits there too, fix the startup failure before deploying again.
- If the logs show a missing environment value or secret, add it to the application’s configuration and redeploy.
- Deploy again once the tasks stay up locally.
What Fjall shows you
The deployment’s detail page on fjall.io shows this code, the affected service, the verbatim ECS reason, and the deploy-time ECS event tail. The CLI prints the same information in its Error Detail block, and the deployments list shows the failure title on the deployment’s row.Related
Deployment safety
How the circuit breaker and the ECS event tail protect your rollouts.
Deploy an application
The full deployment flow, phase by phase.
fjall deploy
Deploy from the CLI and read its failure output.
fjall releases
Check what is currently running after a failed rollout.