Useless Amazon ECS Error Message when creating tasks

六月ゝ 毕业季﹏ 提交于 2019-12-11 00:00:01

问题


Using the ecs agent container on an Ubuntu instance, I am able to register the agent with my cluster.

I also have a service created in that cluster and task definitions as well. When I try to add a task to the cluster I get the useless error message:

Run tasks failed
Reasons : ["ATTRIBUTE"]

The ecs agent log has no related error message. Any thoughts on how I can get better debugging or what the issue might be?

The cli also returns the same useless error message

{
    "tasks": [],
    "failures": [
        {
            "arn": "arn:aws:ecs:us-east-1:sssssss:container-instance/sssssssssssss",
            "reason": "ATTRIBUTE"
        }
    ]
}

回答1:


From the troubleshooting guide:

ATTRIBUTE (container instance ID)

Your task definition contains a parameter that requires a specific container instance attribute that is not available on your container instances. For more information on which attributes are required for specific task definition parameters and agent configuration variables, see Task Definition Parameters and Amazon ECS Container Agent Configuration.

You can find the attributes required for your task definition by looking at the requiredAttributes field. You can find the attributes that are present for your container instances in the result of the DescribeContainerInstances API call.




回答2:


The ECS console webpage does not provide enough information, but you can connect to the EC2 instance to retrieve more logs.

You can try by manually restart ecs agent daemon, ecs agent docker. Sometimes, you need to manually delete the checkpoint file

A cheatsheet with location of logs, commands can be found at ecs-agent troubleshoot



来源:https://stackoverflow.com/questions/45173637/useless-amazon-ecs-error-message-when-creating-tasks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!