AWS ECS代理无法启动

时间:2016-08-18 12:25:24

标签: amazon-web-services docker amazon-ecs

当我尝试运行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 个答案:

答案 0 :(得分:25)

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

答案 1 :(得分:1)

删除位置下方的检查点文件表格

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

现在启动ecs代理

sudo systemctl start ecs

sudo systemctl status ecs