【问题标题】:Why am I getting ClusterNotFoundException The referenced cluster was inactive?为什么我收到 ClusterNotFoundException The referenced cluster is inactive?
【发布时间】:2019-05-25 16:04:22
【问题描述】:

尝试使用 ecs-cli 并获取引用的集群处于非活动状态?

我没有看到我在哪里指定集群?

aws ecs create-cluster --region us-west-2 --cluster burrfg

{
    "cluster": {
        "status": "ACTIVE", 
        "clusterName": "burrfg", 
        "registeredContainerInstancesCount": 0, 
        "pendingTasksCount": 0, 
        "runningTasksCount": 0, 
        "activeServicesCount": 0, 
        "clusterArn": "arn:aws:ecs:us-west-2:5533219:cluster/burrfg"
    }
}


ecs-cli compose --file docker-compose.yml service up
WARN[0000] Skipping unsupported YAML option for service...  option name=expose service name=burrfg
INFO[0001] Using ECS task definition                     TaskDefinition="ubuntudock:3"
ERRO[0001] Error creating service                        error="ClusterNotFoundException: The referenced cluster was inactive.\n\tstatus code: 400, request id: 28eab6b7-7eb2-11e9-be1a-633df2a55bcb" service=ubuntudock
INFO[0001] Created an ECS service                        service=ubuntudock taskDefinition="ubuntudock:3"

码头工人撰写:

version: '3'
services:
  burrfg:
    image: burrfg
    expose:
      - "8080"
    ports:
      - "0.0.0.0:8080:8080"
      - "0.0.0.0:8080:8080/udp"
    environment:
      - NODE_ENV=development
      - PORT=8080
    command:
      sh -c 'npm i && node app.js'
      echo 'ready'

【问题讨论】:

    标签: amazon-web-services docker-compose aws-cli amazon-ecs


    【解决方案1】:

    您似乎没有指定要在其上创建服务的集群,请尝试使用 ecs-cli configure 为 ex's-cli 设置默认集群或使用 ecs-cli compose --cluster-config burrfg file docker-compose.yml —service up 传递集群配置

    另外,为什么要使用 AWS cli 而不是 ecs-cli up 创建集群?

    https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cmd-ecs-cli-configure.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-15
      • 2016-11-17
      • 2018-11-12
      • 1970-01-01
      • 1970-01-01
      • 2017-08-08
      • 1970-01-01
      • 2020-09-13
      相关资源
      最近更新 更多