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
asked a year ago264 views
2 Answers
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.

answered a year ago
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
EXPERT
pechung
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions