Docker 守护进程不再随内核 3.19.0-21 启动

Docker 守护进程不再随内核 3.19.0-21 启动

本周二,我的笔记本电脑 (Latitude E6520) 收到了从 3.19.0-20 到 3.19.0-21 的内核更新。重启时,我出现了内核崩溃,因此我从启动菜单中选择了 3.19.0-20,其余时间一切正常。第二天(即昨天),内核 3.19.0-21 启动正常,一切运行正常除了Docker 守护进程。使用内核 3.19.0-20 重新启动可修复此问题。有人知道如何解除阻止吗?否则,我将把 3.19.0-20 设置为我的默认内核,直到下一次更新。

更新:Docker 1.7 无法解决这个问题。不过日志有所不同(见下文)。

使用内核 3.19.0-21 和 Docker 1.7.0:

Jun 19 10:06:35 E6520-2 systemd[1]: Starting Docker Socket for the API.
Jun 19 10:06:35 E6520-2 systemd[1]: Listening on Docker Socket for the API.
Jun 19 10:06:35 E6520-2 systemd[1]: Started Docker Application Container Engine.
Jun 19 10:06:35 E6520-2 systemd[1]: Starting Docker Application Container Engine...
Jun 19 10:06:35 E6520-2 docker[3779]: time="2015-06-19T10:06:35.917685581+02:00" level=error msg="[graphdriver] prior storage driver \"aufs\" failed: driver not supported"
Jun 19 10:06:35 E6520-2 docker[3779]: time="2015-06-19T10:06:35.917756197+02:00" level=fatal msg="Error starting daemon: error initializing graphdriver: driver not supported"
Jun 19 10:06:35 E6520-2 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 19 10:06:35 E6520-2 systemd[1]: Unit docker.service entered failed state.
Jun 19 10:06:35 E6520-2 systemd[1]: docker.service failed.

今天早上的相关内容/var/log/syslog

使用内核 3.19.0-21:

Jun 18 10:22:27 E6520-2 systemd[1]: Started Docker Application Container Engine.
Jun 18 10:22:27 E6520-2 systemd[1]: Starting Docker Application Container Engine...
Jun 18 10:22:27 E6520-2 docker[891]: time="2015-06-18T10:22:27+02:00" level=warning msg="Udev sync is not supported. This will lead to unexpected behavior, data loss and errors"
Jun 18 10:22:27 E6520-2 kernel: [    7.053225] device-mapper: table: 252:0: thin-pool: unknown target type
Jun 18 10:22:27 E6520-2 kernel: [    7.053229] device-mapper: ioctl: error adding target to table
Jun 18 10:22:27 E6520-2 docker[891]: time="2015-06-18T10:22:27+02:00" level=info msg="+job serveapi(fd://)"
Jun 18 10:22:27 E6520-2 docker[891]: time="2015-06-18T10:22:27+02:00" level=info msg="Listening for HTTP on fd ()"
Jun 18 10:22:27 E6520-2 docker[891]: time="2015-06-18T10:22:27+02:00" level=fatal msg="Shutting down daemon due to errors: error intializing graphdriver: Error running DeviceCreate (CreatePool) dm_task_run failed"
Jun 18 10:22:27 E6520-2 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 18 10:22:27 E6520-2 systemd[1]: Unit docker.service entered failed state.
Jun 18 10:22:27 E6520-2 systemd[1]: docker.service failed.

使用内核 3.19.0-20:

Jun 18 10:23:16 E6520-2 docker[1000]: time="2015-06-18T10:23:16+02:00" level=info msg="+job serveapi(fd://)"
Jun 18 10:23:16 E6520-2 docker[1000]: time="2015-06-18T10:23:16+02:00" level=info msg="Listening for HTTP on fd ()"
Jun 18 10:23:16 E6520-2 kernel: [    7.009467] aufs 3.x-rcN-20150105
Jun 18 10:23:16 E6520-2 docker[1000]: time="2015-06-18T10:23:16+02:00" level=warning msg="Graphdriver aufs selected. Your graphdriver directory /var/lib/docker already contains data managed by other graphdrivers: devicemapper"
Jun 18 10:23:16 E6520-2 docker[1000]: time="2015-06-18T10:23:16+02:00" level=info msg="+job init_networkdriver()"
Jun 18 10:23:17 E6520-2 kernel: [    7.624158] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready
Jun 18 10:23:17 E6520-2 systemd-udevd[358]: Could not generate persistent MAC address for docker0: No such file or directory
Jun 18 10:23:17 E6520-2 avahi-daemon[894]: Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.42.1.
Jun 18 10:23:17 E6520-2 avahi-daemon[894]: New relevant interface docker0.IPv4 for mDNS.
Jun 18 10:23:17 E6520-2 avahi-daemon[894]: Registering new address record for 172.17.42.1 on docker0.IPv4.
Jun 18 10:23:17 E6520-2 NetworkManager[895]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Jun 18 10:23:17 E6520-2 NetworkManager[895]: <info> (docker0): ignoring bridge not created by NetworkManager
Jun 18 10:23:17 E6520-2 NetworkManager[895]: <info> devices added (path: /sys/devices/virtual/net/docker0, iface: docker0)
Jun 18 10:23:17 E6520-2 NetworkManager[895]: <info> device added (path: /sys/devices/virtual/net/docker0, iface: docker0): no ifupdown configuration found.
Jun 18 10:23:17 E6520-2 systemd[1]: Started ifup for docker0.
Jun 18 10:23:17 E6520-2 systemd[1]: Starting ifup for docker0...
Jun 18 10:23:17 E6520-2 sh[1047]: Unknown interface docker0
Jun 18 10:23:17 E6520-2 kernel: [    7.632620] ip_tables: (C) 2000-2006 Netfilter Core Team
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="-job init_networkdriver() = OK (0)"
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=warning msg="Your kernel does not support cgroup swap limit."
Jun 18 10:23:17 E6520-2 systemd[1]: Scope libcontainer-1000-systemd-test-default-dependencies.scope has no PIDs. Refusing.
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="Loading containers: start."
Jun 18 10:23:17 E6520-2 docker[1000]: ....................................
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="Loading containers: done."
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="docker daemon: 1.6.2 7c8fca2; execdriver: native-0.2; graphdriver: aufs"
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="+job acceptconnections()"
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="-job acceptconnections() = OK (0)"
Jun 18 10:23:17 E6520-2 docker[1000]: time="2015-06-18T10:23:17+02:00" level=info msg="Daemon has completed initialization"

答案1

Aufs 不再包含在 Ubuntu 内核包中。(modprobe aufs 会报错)

因为覆盖自 3.18 版起已包含。因此您可以将其用于 docker。(我不知道迁移。)

答案2

因此,看起来内核没有正确安装:它也破坏了 WiFi(lspci -k显示我的 WiFi 卡没有驱动程序)。

运行旧内核几天后,Docker 也出现了问题(由于 Docker 1.7 中的重大更改,请参阅https://github.com/docker/docker/issues/14035)我尝试重新安装新的内核(sudo apt-get install --reinstall linux-image-3.19.0-21-generic)并且它确实起作用了。

答案3

一种方法是直接启动 docker 容器:

我刚刚通过以下方式启动了 docker deamon:

$ sudo docker -d -s overlay

代替

$ sudo docker -d

这对我很有用。


但是因为我想通过

sudo service start docker

我必须编辑该文件:

$ vim /etc/default/docker 


# Docker Upstart and SysVinit configuration file

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--insecure-registry my-repo.de:5000 -s overlay" // here be your config

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

相关内容