簡體   English   中英

為什么ecs-cli服務啟動未完成很長時間

[英]Why ecs-cli service up has not completed for a long time

我想將Docker項目上傳到AWS ECS。 但是我得到了這個錯誤。

INFO[0291] (service myappproject) has started 1 tasks: (task 38184a9c-ff93-4324-b586-424fc025655d).  timestamp="2019-07-02 13:41:45 +0000 UTC"
FATA[0306] Deployment has not completed: Running count has not changed for 5.00 minutes

我使用docker-compose使用ecs-cli上傳python,nginx項目。

這是我的ecs-cli命令。

ecs-cli \
    compose \
        --verbose \
        --file docker-compose.yml \
        --file docker-compose.production.yml \
        --ecs-params ecs-params.yml \
        --region ap-northeast-1 \
        --cluster myapp \
        --project-name myappproject \
    service up \
        --target-group-arn arn:aws:elasticloadbalancing:ap-northeast-1:294598740507:targetgroup/tsujimoto-app-alb-target-group/41c164d963f49806 \
        --container-name nginx \
        --container-port 80 \
        --force-deployment true \
        --timeout 10

這是我的ecs-param.yml

ersion: 1
task_definition:
  ecs_network_mode: awsvpc
  task_execution_role: ecs-task-execution
  task_size:
    cpu_limit: 256
    mem_limit: 512
  services:
    myapp:
      essential: true
    nginx:
      essential: true


run_params:
  network_configuration:
    awsvpc_configuration:
      subnets:
        - subnet-096df842a99829e4f
        - subnet-07c7f04d0b61c3346
      security_groups:
        - sg-09d046dd7faac15f4

有人知道嗎?

我發現網絡無法訪問Docker映像。 我在ecs-params.yml中添加了“ assign_public_ip:ENABLED”,並成功創建了項目。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM