容器:
# docker ps | grep 950677e2317f950677e2317f 7e553d1d9f6f "/bin/sh -c /minecraf" 2 days ago Up 2 days 0.0.0.0:22661->22661/tcp,0.0.0.0:22661->22661/udp,0.0.0.0:37681->37681/tcp,0.0.0.0:37681->37681/udp gloomy_jennings
尝试使用docker守护程序停止容器(它会永远尝试而不会产生结果):
# time docker stop --time=1 950677e2317f^Creal 0m13.508suser 0m0.036ssys 0m0.008s
尝试停止时守护进程记录:
# journalctl -fu docker.service-- Logs begin at Fri 2015-12-11 15:40:55 CET. --Dec 31 23:30:33 m3561.contabo.host docker[9988]: time="2015-12-31T23:30:33.164731953+01:00" level=info msg="POST /v1.21/containers/950677e2317f/stop?t=1"Dec 31 23:30:34 m3561.contabo.host docker[9988]: time="2015-12-31T23:30:34.165531990+01:00" level=info msg="Container 950677e2317fcd2403ef5b5ffad37204e880136e91f76b0a8682e04a93e80942 Failed to exit within 1 seconds of SIGTERM - using the force"Dec 31 23:30:44 m3561.contabo.host docker[9988]: time="2015-12-31T23:30:44.165954266+01:00" level=info msg="Container 950677e2317f Failed to exit within 10 seconds of kill - trying direct SIGKILL"
查看机器上运行的进程会显示僵尸进程(主机上的pID 11991):
# ps aux | grep [1]1991root 11991 84.3 0.0 5836 132 ? R Dec30 1300:19 bash -c (echo stop > /tmp/minecraft &)# top -b | grep [1]199111991 root 20 0 5836 132 20 R 89.5 0.0 1300:29 bash
它确实是在我们的容器中运行的进程(检查容器ID):
# cat /proc/11991/mountinfo.../var/lib/docker/containers/950677e2317fcd2403ef5b5ffad37204e880136e91f76b0a8682e04a93e80942/resolv.conf /etc/resolv.conf rw,relatime - ext4 /dev/sda2 rw,errors=remount-ro,data=ordered
试图杀死进程不会产生任何结果:
# kill -9 11991# ps aux | grep [1]1991root 11991 84.3 0.0 5836 132 ? R Dec30 1303:58 bash -c (echo stop > /tmp/minecraft &)
一些概述数据:
# docker versionClIEnt: Version: 1.9.1 API version: 1.21 Go version: go1.4.2 Git commit: a34a1d5 Built: Fri Nov 20 13:20:08 UTC 2015 OS/Arch: linux/amd64Server: Version: 1.9.1 API version: 1.21 Go version: go1.4.2 Git commit: a34a1d5 Built: Fri Nov 20 13:20:08 UTC 2015 OS/Arch: linux/amd64# docker infoContainers: 189Images: 322Server Version: 1.9.1Storage Driver: aufs Root Dir: /var/lib/docker/aufs backing filesystem: extfs Dirs: 700 Dirperm1 Supported: trueExecution Driver: native-0.2Logging Driver: Json-fileKernel Version: 4.2.0-19-genericOperating System: Ubuntu 15.10cpus: 24Total Memory: 125.8 GiBname: m3561.contabo.hostID: ZM2Q:RA6Q:E4NM:5Q2Q:R7E4:BFPQ:EEVK:7MEO:YRH6:SVS6:RIHA:3I2K# uname -alinux m3561.contabo.host 4.2.0-19-generic #23-Ubuntu SMP Wed Nov 11 11:39:30 UTC 2015 x86_64 x86_64 x86_64 GNU/linux
如果停止docker守护程序,进程仍然存在.摆脱进程的唯一方法是重启主机.由于这种情况经常发生(要求每个节点每3-7天重新启动一次),因此会严重影响整个集群的正常运行时间.
关于该做什么的任何想法?
解决方法 好吧,我想我找到了这个的根本原因.在Docker上的人们帮助我,在GitHub上查看 this个帖子.事实证明这很可能是linux内核4.19中的一个错误.在修复之前,我将回滚到旧版本.
更新:我已经在我的集群中运行3. *几天没有任何问题.这肯定是一个内核错误.
总结以上是内存溢出为你收集整理的linux-kernel – 无法杀死进程(源自docker容器)全部内容,希望文章能够帮你解决linux-kernel – 无法杀死进程(源自docker容器)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)