docker 服务启动后不断消耗内存,直至耗尽

舍瓦温
  • 103

CentOS 7.1 使用 Docker

  • servcie docker start 执行不会返回,Ctrl + C 关掉

  • 但 docker 服务已经启动,启动后不断耗用内存,直至内存耗尽

  • 期间执行 docker ps 等命令都不能返回

请问该如何继续排查?

操作截屏

回复
阅读 8.3k
2 个回答

排查日志:

  1. 先通过 systemctl status docker 观察;

  2. 通过 journalctl -u docker.service docker unit 日志;

  3. 还没解决,就看 /var/log/message 下的日志吧

@Jason_Geng[_Jason_]

停到了 Loading containers: start.,之后不久系统就挂了。

[root@host-10-62-46-140 ~]# tail /var/log/messages|more
Jul 14 09:07:44 localhost kernel: device-mapper: uevent: version 1.0.3
Jul 14 09:07:44 localhost kernel: device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-devel@redhat.com
Jul 14 09:07:44 localhost kernel: loop: module loaded
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.132265851+08:00" level=warning msg="devmapper: Usage of loopback devices is stro
ngly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.187694580+08:00" level=warning msg="devmapper: Base device already exists and ha
s filesystem xfs on it. User specified filesystem  will be ignored."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.223164257+08:00" level=info msg="[graphdriver] using prior storage driver \"devi
cemapper\""
Jul 14 09:08:39 localhost dockerd-current: time="2017-07-14T09:08:39.903594526+08:00" level=warning msg="Docker could not enable SELinux on the host
system"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009487566+08:00" level=info msg="Graph migration to content-addressability took
0.00 seconds"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009880108+08:00" level=warning msg="mountpoint for pids not found"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.010225293+08:00" level=info msg="Loading containers: start."
[root@host-10-62-46-140 ~]# tail /var/log/messages|more
Jul 14 09:07:44 localhost kernel: device-mapper: uevent: version 1.0.3
Jul 14 09:07:44 localhost kernel: device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-devel@redhat.com
Jul 14 09:07:44 localhost kernel: loop: module loaded
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.132265851+08:00" level=warning msg="devmapper: Usage of loopback devices is stro
ngly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.187694580+08:00" level=warning msg="devmapper: Base device already exists and ha
s filesystem xfs on it. User specified filesystem  will be ignored."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.223164257+08:00" level=info msg="[graphdriver] using prior storage driver \"devi
cemapper\""
Jul 14 09:08:39 localhost dockerd-current: time="2017-07-14T09:08:39.903594526+08:00" level=warning msg="Docker could not enable SELinux on the host
system"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009487566+08:00" level=info msg="Graph migration to content-addressability took
0.00 seconds"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009880108+08:00" level=warning msg="mountpoint for pids not found"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.010225293+08:00" level=info msg="Loading containers: start."
[root@host-10-62-46-140 ~]# tail /var/log/messages|more
Jul 14 09:07:44 localhost kernel: device-mapper: uevent: version 1.0.3
Jul 14 09:07:44 localhost kernel: device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-devel@redhat.com
Jul 14 09:07:44 localhost kernel: loop: module loaded
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.132265851+08:00" level=warning msg="devmapper: Usage of loopback devices is stro
ngly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.187694580+08:00" level=warning msg="devmapper: Base device already exists and ha
s filesystem xfs on it. User specified filesystem  will be ignored."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.223164257+08:00" level=info msg="[graphdriver] using prior storage driver \"devi
cemapper\""
Jul 14 09:08:39 localhost dockerd-current: time="2017-07-14T09:08:39.903594526+08:00" level=warning msg="Docker could not enable SELinux on the host
system"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009487566+08:00" level=info msg="Graph migration to content-addressability took
0.00 seconds"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009880108+08:00" level=warning msg="mountpoint for pids not found"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.010225293+08:00" level=info msg="Loading containers: start."
[root@host-10-62-46-140 ~]# tail /var/log/messages|more
Jul 14 09:07:44 localhost kernel: device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-devel@redhat.com
Jul 14 09:07:44 localhost kernel: loop: module loaded
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.132265851+08:00" level=warning msg="devmapper: Usage of loopback devices is stro
ngly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.187694580+08:00" level=warning msg="devmapper: Base device already exists and ha
s filesystem xfs on it. User specified filesystem  will be ignored."
Jul 14 09:08:05 localhost dockerd-current: time="2017-07-14T09:08:05.223164257+08:00" level=info msg="[graphdriver] using prior storage driver \"devi
cemapper\""
Jul 14 09:08:39 localhost dockerd-current: time="2017-07-14T09:08:39.903594526+08:00" level=warning msg="Docker could not enable SELinux on the host
system"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009487566+08:00" level=info msg="Graph migration to content-addressability took
0.00 seconds"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.009880108+08:00" level=warning msg="mountpoint for pids not found"
Jul 14 09:08:40 localhost dockerd-current: time="2017-07-14T09:08:40.010225293+08:00" level=info msg="Loading containers: start."
Jul 14 09:08:47 localhost dockerd-current: ..........................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....................................................................................................................................................
.....
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏