compose: Error while Killing - level=error msg="got 3 SIGTERM/SIGINTs, forcing shutdown

Description

Steps to reproduce the issue:

  1. with docker running in terminal use ctrl+c to stop
  2. ctrl + c again to force it to stop
  3. error message appears

Describe the results you received: level=error msg=“got 3 SIGTERM/SIGINTs, forcing shutdown”

Describe the results you expected:

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

Output of docker compose version:

Docker Compose version v2.2.1

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.7.1)  
  compose: Docker Compose (Docker Inc., v2.2.1)
  scan: Docker Scan (Docker Inc., v0.14.0)     

Server:
 Containers: 13
  Running: 1
  Paused: 0
  Stopped: 12
 Images: 13
 Server Version: 20.10.11
 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: 1
 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: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.60.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 24.84GiB
 Name: docker-desktop
 ID: 3NNE:S3JO:7PS5:XYME:K5M4:HHNM:HNPX:TBBB:2JPY:NORI:GEDC:ZAUN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Additional environment details:

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 27 (10 by maintainers)

Most upvoted comments

The issue is fixed for me too. Thank you!

My issue is fixed.

docker 20.10.23 was released to download.docker.com, which also includes .deb and .rpm packages for docker compose 2.15.1 👍

@glours here goes:

docker-compose.yaml

version: '3.8'

services:
  test:
    image: alpine:3.17
    command:
      - sleep
      - 1d

Repro:

kaos@kaos:~/docker_logs$ docker compose up --build --wait
[+] Running 1/1
 ⠿ Container docker_logs-test-1  Healthy                                                                                                                                                                                                                                                                                                       0.8s
kaos@kaos:~/docker_logs$ docker compose logs -t -f 
^C^C^CERRO[0016] got 3 SIGTERM/SIGINTs, forcing shutdown
kaos@kaos:~/docker_logs$

docker compose version

Docker Compose version v2.14.1

docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
  compose: Docker Compose (Docker Inc., v2.14.1)
  scan: Docker Scan (Docker Inc., v0.23.0)

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 86
 Server Version: 20.10.22
 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: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: a5nhj609hyxrcc0hef8zui0zf
  Is Manager: true
  ClusterID: 9m3boeejoecuyiainnkifbcpd
  Managers: 1
  Nodes: 4
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 1
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 10.42.0.1
  Manager Addresses:
   10.42.0.1:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 5b842e528e99d4d4c1686467debf2bd4b88ecd86
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.0-135-generic
 Operating System: Ubuntu 20.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.17GiB
 Name: kaos
 ID: XTH4:MDRF:FKUK:LKU2:JDL3:GDZY:VK4Q:CECH:EF3A:DMSJ:2HC5:4MS6
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

I’m seeing the same behavior as @jonerrr, same versions and all.

@Zainzzkk, any chance we could get this issue re-opened?

I am having the same issue when I run docker compose logs -f on Debian 11 and docker compose version 2.14.1.

Docker version:

Client: Docker Engine - Community
 Version:           20.10.22
 API version:       1.41
 Go version:        go1.18.9
 Git commit:        3a2c30b
 Built:             Thu Dec 15 22:28:22 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.22
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.9
  Git commit:       42c8b31
  Built:            Thu Dec 15 22:26:14 2022
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.6.14
  GitCommit:        9ba4b250366a5ddde94bb7c9d1def331423aa323
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

I tried a few variations of the configurations and it looks like the problem only arises when Django runserver or gunicorn, so it’s probably due to the servers intercepting the CTRL-C somehow.

A simple thing you can do is to run the samples from awesome-compose and check if you can reproduce the issue. For example you can try samples using same tech as your stack (django, flask-redis ones)

This has been fixed in docker desktop 4.4.4

Not for me - happening on Docker Desktop 4.10.0 (82025)