gpt4 book ai didi

amazon-web-services - 亚马逊 ECS "the referenced cluster was inactive"

转载 作者:行者123 更新时间:2023-12-02 18:55:25 29 4
gpt4 key购买 nike

我按照步骤在 Ubuntu 16 上安装 ECS 客户端,但是当我尝试运行 ECS 容器代理时,它会不断重启,当我查看日志时

2016-12-07T06:01:39Z [INFO] Starting Agent: Amazon ECS Agent - v1.13.1 (efe53c6)
2016-12-07T06:01:39Z [INFO] Loading configuration
2016-12-07T06:01:39Z [INFO] Checkpointing is enabled. Attempting to load state
2016-12-07T06:01:39Z [INFO] Loading state! module="statemanager"
2016-12-07T06:01:39Z [INFO] Event stream ContainerChange start listening...
2016-12-07T06:01:39Z [INFO] Detected Docker versions [1.17 1.18 1.19 1.20 1.21 1.22 1.23]
2016-12-07T06:01:39Z [INFO] Registering Instance with ECS
2016-12-07T06:01:39Z [ERROR] Could not register module="api client" err="ClientException: The referenced cluster was inactive.
status code: 400, request id: 9eaa4124-bc42-11e6-9cf1-7559dea2bdf8"
2016-12-07T06:01:39Z [ERROR] Error registering: ClientException: The referenced cluster was inactive.
status code: 400, request id: 9eaa4124-bc42-11e6-9cf1-7559dea2bdf8

我没有在谷歌上找到这个错误的引用,我想知道怎么了......

我需要在 ECS Dashboard 上创建集群名称吗?
我已将容器角色附加到我的 EC2 实例,它允许创建集群,所以我认为问题不在于这里......

我的 docker 运行配置
sudo docker run --name ecs-agent \
--detach=true \
--restart=on-failure:10 \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--volume=/var/log/ecs/:/log \
--volume=/var/lib/ecs/data:/data \
--net=host \
--env=ECS_LOGFILE=/var/log/ecs-agent.log \
--env=ECS_LOGLEVEL=info \
--env=ECS_DATADIR=/data \
--env=ECS_CLUSTER=my-cluster \
--env=ECS_ENABLE_TASK_IAM_ROLE=true \
--env=ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST=true \
amazon/amazon-ecs-agent:latest

最佳答案

您需要调用aws ecs create-cluster --region $REGION --cluster my-cluster , 调用CreateCluster API 通过 SDK,或在控制台中创建。 ECS 代理只会自动创建一个名为 default 的集群。 , 并且仅当 ECS_CLUSTER未指定。

关于amazon-web-services - 亚马逊 ECS "the referenced cluster was inactive",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41010541/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com