AWS ECS agent won't start

When I try to run the ECS agent, I get the following error in the ecs-init.log*:

[INFO] Agent exited with code 5
[ERROR] agent exited with terminal exit code

And in the ecs-agent.log* file I get this:

  • Get Elasticache address from within a docker Elastic Beanstalk container
  • Using docker with RDS (Prod), but confused about local DB setup (dev)
  • What is the minimum healthy percent and maximum percent in Amazon ECS
  • AWS Elastic Beanstalk Docker deployment failed
  • Docker build npm error logs
  • AWS ECS container exiting without specific reason
  • [CRITICAL] Data mismatch; saved cluster 'cluster1' does not match configured cluster 'cluster2'. Perhaps you want to delete the configured checkpoint file?
    

    Any idea where is that checkpoint file?

  • Does docker build run commands twice?
  • How to make environmental variables available to Docker RUN commands from docker-compose?
  • Get TeamCity running on Docker
  • docker change Ctrl+p to something else?
  • Docker: what is the equivalent of the legacy --link parameter
  • Docker-compose mysql: import .sql
  • One Solution collect form web for “AWS ECS agent won't start”

    I found the answer myself. The checkpoint file is located in this directory: /var/lib/ecs/data/ecs_agent_data.json.
    Just delete that json file and start the ECS agent again running start ecs.
    Thanks to this forum post, which indirectly led me to the answer: https://forums.aws.amazon.com/thread.jspa?messageID=625643

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.