docker - 容器突然终止并发出警告 "cleaning up after killed shim"

标签 docker ubuntu-16.04 virtualization docker-engine containerd

我们最近在部署环境中从 docker 版本 17.06.0-ce 升级到 18.09.2。 有经验的容器在运行几天后突然被杀死,docker 日志中没有太多信息。

监控内存使用情况,受影响的容器远低于所有限制(每个容器以及主机有足够的可用内存)。

问题期间的设置观察:

  1. docker 版本为 18.09.2,大约有 30 个正在运行的容器。
  2. 有经验的容器在运行几天后被杀死。

在容器崩溃期间观察到的 Docker 日志

Nov 16 15:42:11 site1 containerd[1762]: time="2020-11-16T15:42:11.171040904Z" level=info msg="shim reaped" id=d39355d3061d461ad4a305c717b699bd332aae50d47c2bf2b547bef50f767c7d
Nov 16 15:42:11 site1 containerd[1762]: time="2020-11-16T15:42:11.171156262Z" level=warning msg="cleaning up after killed shim" id=d39355d3061d461ad4a305c717b699bd332aae50d47c2bf2b547bef50f767c7d namespace=moby
Nov 16 15:42:11 site1 dockerd[3022]: time="2020-11-16T15:42:11.171164295Z" level=warning msg="failed to delete process" container=d39355d3061d461ad4a305c717b699bd332aae50d47c2bf2b547bef50f767c7d error="ttrpc: client shutting down: ttrpc: closed: unknown" module=libcontainerd namespace=moby process=b0d77b1ebf2c82b09c152530a5e24491d76e216b852e385686c46128c94e7f5a
Nov 16 15:42:11 site1 c73920e3476c[3022]: INFO: 2020/11/16 15:42:11.396872 [nameserver a6:0c:6a:18:69:1f] container d39355d3061d461ad4a305c717b699bd332aae50d47c2bf2b547bef50f767c7d died; tombstoning entry test-endpoint-s104.weave.local. -> 10.44.0.14


Output of Docker version

Client:
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        6247962
 Built:             Sun Feb 10 04:13:50 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       6247962
  Built:            Sun Feb 10 03:42:13 2019
  OS/Arch:          linux/amd64
  Experimental:     false



Output of Docker Info:

Containers: 30
 Running: 25
 Paused: 0
 Stopped: 5
Images: 236
Server Version: 18.09.2
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-171-generic
Operating System: Ubuntu 16.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 62.92GiB
Name: fpas-site1-dra-director-a
ID: KKSM:3YNF:LE7N:NVFE:Y5C4:C6CN:LAQT:QRRZ:VYQS:O4PP:VQKG:DXTK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
 com.broadhop.swarm.uuid=uuid4:d96aef99-b5fc-44e3-b7fa-65b08b7e30f3
 com.broadhop.swarm.role=endpoint-role
 com.broadhop.swarm.node=
 com.broadhop.swarm.hostname=site1
 com.broadhop.swarm.mode=
 com.broadhop.network.interfaces=internal:172.26.50.13
Experimental: false
Insecure Registries:
 registry:5000
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: API is accessible on http://127.0.0.1:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
WARNING: No swap limit support

注意: 由于此部署是在关键基础设施上进行的,因此我们想了解发生这种情况的原因并确定这种情况不会再次发生。是否有人在任何环境中遇到过相同类型的问题,如果使用的 docker 版本存在已知问题,请告诉我们。

最佳答案

你的go lang版本比较旧,你可以尝试更新一下。我在 github 中发现了这个问题。

https://github.com/moby/moby/issues/38742

关于docker - 容器突然终止并发出警告 "cleaning up after killed shim",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65131955/

相关文章:

Virtualbox 启用嵌套 vtx/amd-v 变灰

docker - 错误 : unsatisfiable constraints - on php:7-fpm-alpine

docker - 在 docker 上启用实时恢复并不能保持容器存活

mysql - ubuntu16.04安装Mysql-server出错

ubuntu - Ubuntu 上的 Hortonworks SSH 问题 : ssh_exchange_identification: Connection closed by remote host

ubuntu - "sudo"命令在 Ubuntu 16.04 上不需要密码

docker - 如何将 OpenFaaS 镜像推送到 Minishift/Openshift Docker 注册表?

适用于 Windows 的 Docker : Accessing named volume mounts

linux - Docker 只监听 8080 端口

virtualization - 为 vmware 付费还是使用开源?