19

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:

[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?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Pedro Madrid
  • 1,887
  • 1
  • 20
  • 32

2 Answers2

35

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

Pedro Madrid
  • 1,887
  • 1
  • 20
  • 32
24

delete checkpoint file form below location

sudo rm /var/lib/ecs/data/agent.db

now start ecs agent

sudo systemctl start ecs

sudo systemctl status ecs
smakintel.com
  • 416
  • 4
  • 5