ecs service connect issue on arm bases ec2 instances

0

I have ECS cluster which actually based on arm 64 ec2 instances. and all tasks work as expected when I turn on aws ecs service connect I see such error in the deployment logs

service *** was unable to place a task because no container instance met all of its requirements. The closest matching container-instance *** is missing an attribute required by your task. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.

Below part of task defenition.

      "portMappings": [
        {
          "name" : "orders-port",
          "hostPort": 0,
          "containerPort": 8080
        }
      ],
      "runtimePlatform": {
        "operatingSystemFamily": "LINUX",
        "cpuArchitecture": "ARM64"
      },

it's definitely not related to memory or CPU, the chart is okay. does someone have an idea what is going on? ( i have the latest version of the AL Linux 2023 and ecs agent)

alex
질문됨 일 년 전277회 조회
2개 답변
0

The error message you are encountering indicates that the ECS service is unable to find a suitable container instance to place your task due to a missing attribute. The error suggests that the closest matching container instance is lacking a required attribute specified in your task definition.

To troubleshoot this issue, consider the following steps:

  1. Verify container instance attributes: Review the attributes specified in your task definition and ensure that they match the attributes of the container instance you are targeting. Check for any specific requirements or dependencies that your task may have.

  2. Check instance metadata and configuration: Confirm that the container instance has the necessary metadata and configuration set up correctly. Pay attention to any attributes or configurations that your task relies on.

  3. Review ECS agent logs: Check the ECS agent logs on the container instance for any relevant error messages or warnings. The logs may provide additional information about the missing attribute or any other issues encountered during task placement.

  4. Update ECS agent and AL Linux versions: Although you mentioned having the latest version of the AL Linux 2023 and ECS agent, it's worth verifying that you are indeed using the most recent versions. Outdated versions can sometimes cause compatibility issues or bugs that could impact task placement.

  5. Consult the Amazon ECS Developer Guide: The Troubleshooting section of the Amazon ECS Developer Guide contains additional information and solutions for common issues related to task placement. It may provide specific guidance for resolving the error you are encountering.

If the issue persists after following these steps, you may consider reaching out to AWS support for further assistance. They can provide more in-depth troubleshooting and guidance based on your specific setup and configuration.

답변함 일 년 전
0

It appears as though the ECS service couldn't find the right container instance to meet the requirements of your task. Are there other components of the task definition that you haven't shared such as CPU, Memory, image, execution role, and capability requirements? There could be a missing attribute that is impacting ECS' ability to find you the right instance. Take a look at some of the example here that might help.

profile pictureAWS
전문가
pechung
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인