Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Error Deploying Docker containers on ECS #2140

Open
navata opened this issue Apr 3, 2022 · 8 comments
Open

Error Deploying Docker containers on ECS #2140

navata opened this issue Apr 3, 2022 · 8 comments

Comments

@navata
Copy link

navata commented Apr 3, 2022

Description
I have use Docker Compose CLI for Deploying Docker containers on ECS. But it is error and auto delete ECS resource.
I can't check log and know reason
This is my docker-compose.yml
Screen Shot 2022-04-03 at 09 31 17

Steps to reproduce the issue:

  1. docker context create ecs myecscontext
  2. docker context use myecscontext
  3. docker compose up

Describe the results you received:
Error message: CreateFailed Resource creation cancelled

Screen Shot 2022-04-03 at 08 50 55
Screen Shot 2022-04-03 at 09 30 16

Describe the results you expected:
I want deploy to successfully and can inspect error when deploy failed.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.3.3

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.8.1)
  compose: Docker Compose (Docker Inc., v2.3.3)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 3
  Running: 1
  Paused: 0
  Stopped: 2
 Images: 6
 Server Version: 20.10.13
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2a1d4dbdb2a1030dc5b01e96fb110a9d9f150ecc
 runc version: v1.0.3-0-gf46b6ba
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.104-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.667GiB
 Name: docker-desktop
 ID: QGS2:E6J4:FTJQ:4ORS:IWV3:EMDM:LN63:Y7OH:KT7T:RYST:NOS2:5W5H
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5000
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details:

@glours glours transferred this issue from docker/compose Apr 3, 2022
@arauchberger
Copy link

i currently face exactly the same issue. i do have a compose with two services. one seems to start (i can see logs in CloudWatch) the other files for a unknown reason.
since i can not find any hints why it fails it's hard to analyse.

@Joshua-Igoni
Copy link

currently facing same issue, is there any fix for this...
am deploying about five services with docker-compose.
The cluster gets created but then it automatically deletes containers created, seems kinda strange

@arauchberger
Copy link

what i found out so far ist that you need to use the detached option to get it running (seems to be a bug)

docker compose -f my.yml up -d

@Joshua-Igoni
Copy link

Thanks that helped @arauchberger

@JohnPreston
Copy link

Shameless input here: instead of using this docker compose plugin to do all this, you can try out ECS Compose-X which we use daily to do all our deployments across multiple accounts and environments.
It is a lot more flexible on the resources to create and re-use (using tag based import and otherwise AWS APIs) to connect / deploy your services into.

@hodlen
Copy link

hodlen commented Sep 29, 2022

Thanks a lot @arauchberger ! It worked like a charm!

@ghost
Copy link

ghost commented May 15, 2023

what i found out so far ist that you need to use the detached option to get it running (seems to be a bug)

docker compose -f my.yml up -d

I CANNOT BELIEVE THIS WORKED!
Been banging my head on the wall with this issue for over a week now.
THANKS BRO ILY <3

@eugenmihailescu
Copy link

eugenmihailescu commented Aug 11, 2023

If --detach (as suggested above) doesn't solve the issue then it's worth checking it if the AWS ELB health checker succeeds on your service's published ports.
So for instance if your cluster deploys among others a http service which publishes ports 80 & 443 then make sure the service responds successfully on both ports (http/200). If the health check will fail so will your service, thus your cluster deployment will fail as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants