Docker守护进程挂起

时间:2017-11-12 06:25:22

标签: docker daemon

我是docker的新手,并试图了解我的docker守护程序挂起的原因。

我已将基本池大小增加到15GB以启动oracle db容器。我成功地启动了它,但一段时间后我的虚拟机停止响应并且在docker停止后不久。无论出于何种原因,我无法启动它。

这是我运行的命令,/usr/bin/dockerd --storage-opt dm.basesize=15G &

我看到日志如下:

WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 
max=4096
WARN[0001] devmapper: Usage of loopback devices is strongly discouraged for 
production use. Please use `--storage-opt dm.thinpooldev` or use `man 
docker` to refer to dm.thinpooldev section.
WARN[0001] devmapper: Base device already exists and has filesystem xfs on 
it. User specified filesystem  will be ignored.
INFO[0001] [graphdriver] using prior storage driver "devicemapper"
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] mountpoint for pids not found
INFO[0001] Loading containers: start.
INFO[0001] Firewalld running: false
INFO[0001] Default bridge (docker0) is assigned with an IP address 
172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address

在此之后,我的虚拟机停止响应。我必须重新启动我的虚拟机,而虚拟机又不启动docker。一旦我再次启动我的docker守护进程,我就会看到上面的日志

我有rhel 7.3和docker版本1.12,我使用docker-compose来创建容器

如果您需要更多信息,请与我们联系

谢谢

2 个答案:

答案 0 :(得分:0)

关于loopback devices is there for a reason的警告:

WARN[0001] devmapper: Usage of loopback devices is strongly discouraged for 
production use. Please use `--storage-opt dm.thinpooldev` or use `man 
docker` to refer to dm.thinpooldev section.

大多数情况下,Docker的空间不足导致守护进程挂起。在环回文件系统上,它可能会更随机地发生,特别是如果你强调文件系统。

尝试使用direct-lvm pool instead环回设备。

答案 1 :(得分:0)

一旦我看到Docker服务像这样挂在Ubuntu上:

\_ /bin/sh /usr/sbin/invoke-rc.d docker start
   \_ systemctl --job-mode=ignore-dependencies start docker.service
      \_ /bin/systemd-tty-ask-password-agent --watch

对我来说,解决方案是禁用systemd-ask-password-wall.service:

systemctl disable systemd-ask-password-wall.service