AWS ECS代理无法启动

19
当我尝试运行ECS代理时,我在ecs-init.log中收到以下错误消息*:
[INFO] Agent exited with code 5
[ERROR] agent exited with terminal exit code

在 ecs-agent.log* 文件中,我得到了以下内容:

[CRITICAL] Data mismatch; saved cluster 'cluster1' does not match configured cluster 'cluster2'. Perhaps you want to delete the configured checkpoint file?

知道那个检查点文件在哪里吗?

2个回答

36

我自己找到了答案。检查点文件位于此目录:/var/lib/ecs/data/ecs_agent_data.json。只需删除该json文件,然后再次运行start ecs以启动ECS代理。 感谢这篇论坛帖子,它间接地引导我找到答案:https://forums.aws.amazon.com/thread.jspa?messageID=625643


25

从下面的位置删除检查点文件

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

现在启动 ECS 代理

sudo systemctl start ecs

sudo systemctl status ecs

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接