最近,我docker
在本地Fedora 21上的服务停止了工作。当我尝试使用以下方式运行守护程序时:
sudo systemctl start docker
它的结尾是:
Job for docker.service failed. See "systemctl status docker.service" and "journalctl -xe" for details.
通过检查码头工人状态 sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
Active: failed (Result: exit-code) since pon 2015-02-09 10:37:44 CET; 5s ago
Docs: http://docs.docker.com
Process: 2673 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS (code=exited, status=1/FAILURE)
Main PID: 2673 (code=exited, status=1/FAILURE)
lut 09 10:37:44 localhost.localdomain docker[2673]: time="2015-02-09T10:37:44+01:00" level="debug" msg="Registering POST, /exec/{name:.*}/start"
lut 09 10:37:44 localhost.localdomain docker[2673]: time="2015-02-09T10:37:44+01:00" level="debug" msg="Registering DELETE, /containers/{name:.*}"
lut 09 10:37:44 localhost.localdomain docker[2673]: time="2015-02-09T10:37:44+01:00" level="debug" msg="Registering DELETE, /images/{name:.*}"
lut 09 10:37:44 localhost.localdomain docker[2673]: No sockets found
lut 09 10:37:44 localhost.localdomain docker[2673]: time="2015-02-09T10:37:44+01:00" level="info" msg="-job serveapi(fd://, tcp://0.0.0.0:2376) = ERR (1)"
lut 09 10:37:44 localhost.localdomain docker[2673]: time="2015-02-09T10:37:44+01:00" level="fatal" msg="No sockets found"
lut 09 10:37:44 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
lut 09 10:37:44 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
lut 09 10:37:44 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
lut 09 10:37:44 localhost.localdomain systemd[1]: docker.service failed.
事实证明,没有/var/run/docker.sock
套接字,无法在启动docker服务时创建该套接字。如果我尝试使用以下命令运行它:
sudo docker -d
它的结尾是:
[1] % sudo docker -d
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
FATA[0000] EOF
添加-D
选项:
[1] % sudo docker -d -D
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Registering GET, /version
DEBU[0000] Registering GET, /images/json
DEBU[0000] Registering GET, /containers/{name:.*}/top
DEBU[0000] Registering GET, /containers/{name:.*}/logs
DEBU[0000] Registering GET, /images/viz
DEBU[0000] Registering GET, /images/search
DEBU[0000] Registering GET, /containers/ps
DEBU[0000] Registering GET, /containers/json
DEBU[0000] Registering GET, /containers/{name:.*}/changes
DEBU[0000] Registering GET, /containers/{name:.*}/json
DEBU[0000] Registering GET, /_ping
DEBU[0000] Registering GET, /events
DEBU[0000] Registering GET, /info
DEBU[0000] Registering GET, /images/{name:.*}/json
DEBU[0000] Registering GET, /images/get
DEBU[0000] Registering GET, /images/{name:.*}/get
DEBU[0000] Registering GET, /images/{name:.*}/history
DEBU[0000] Registering GET, /containers/{name:.*}/export
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws
DEBU[0000] Registering GET, /exec/{id:.*}/json
DEBU[0000] Registering POST, /containers/{name:.*}/copy
DEBU[0000] Registering POST, /containers/{name:.*}/exec
DEBU[0000] Registering POST, /exec/{name:.*}/start
DEBU[0000] Registering POST, /exec/{name:.*}/resize
DEBU[0000] Registering POST, /commit
DEBU[0000] Registering POST, /containers/{name:.*}/pause
DEBU[0000] Registering POST, /containers/{name:.*}/resize
DEBU[0000] Registering POST, /containers/{name:.*}/start
DEBU[0000] Registering POST, /containers/{name:.*}/attach
DEBU[0000] Registering POST, /auth
DEBU[0000] Registering POST, /containers/{name:.*}/kill
DEBU[0000] Registering POST, /containers/{name:.*}/unpause
DEBU[0000] Registering POST, /images/{name:.*}/tag
DEBU[0000] Registering POST, /containers/{name:.*}/restart
DEBU[0000] Registering POST, /containers/{name:.*}/stop
DEBU[0000] Registering POST, /containers/{name:.*}/wait
DEBU[0000] Registering POST, /build
DEBU[0000] Registering POST, /images/load
DEBU[0000] Registering POST, /images/{name:.*}/push
DEBU[0000] Registering POST, /images/create
DEBU[0000] Registering POST, /containers/create
DEBU[0000] Registering DELETE, /containers/{name:.*}
DEBU[0000] Registering DELETE, /images/{name:.*}
DEBU[0000] Registering OPTIONS,
DEBU[0000] docker group found. gid: 977
DEBU[0000] Generated prefix: docker-8:3-6961299
DEBU[0000] Checking for existence of the pool 'docker-8:3-6961299-pool'
FATA[0000] EOF
几天前,它一直在工作,docker始终使用以下选项运行:
--selinux-enabled -D -H fd:// -H tcp://0.0.0.0:2376 --bip=172.17.42.1/16 --dns=172.17.42.1 --dns-search=docker
我的问题是:问题的根源可能是什么?几天前Docker运行顺利。docker-io
根据以下内容,更改的是2月5日的更新yum.log
:
[0] % sudo tail -n 100 /var/log/yum.log | grep dock
Feb 05 18:49:42 Updated: docker-io-1.4.1-8.fc21.x86_64
有关我的操作系统的更多详细信息:
浅顶软呢帽21 Linux 3.18.5-201.fc21.x86_64 #1 SMP Mon Feb 2 21:00:58 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
码头工人 Docker version 1.4.1, build 5bc2ff8/1.4.1
PS:我以前的Docker版本是:
Dec 15 20:34:33 Updated: docker-io-1.4.0-1.fc21.x86_64
事实证明,此问题与无关docker-1.4.1
,我已经尝试将降级到1.4.0和1.3.2,结果相同。我检查了我的日志,确定该日志最后一次有效是在2月4日。从那时起,已经更新了几个软件包,这是yum.log的完整列表:
Feb 05 18:49:31 Updated: claws-mail-3.11.1-3.fc21.x86_64
Feb 05 18:49:31 Updated: claws-mail-plugins-pgp-3.11.1-3.fc21.x86_64
Feb 05 18:49:31 Updated: firewalld-filesystem-0.3.13-2.fc21.noarch
Feb 05 18:49:31 Updated: 1:xscreensaver-base-5.32-4.fc21.x86_64
Feb 05 18:49:32 Installed: python2-firewall-0.3.13-2.fc21.noarch
Feb 05 18:49:32 Updated: firewalld-config-standard-0.3.13-2.fc21.noarch
Feb 05 18:49:32 Updated: firewalld-0.3.13-2.fc21.noarch
Feb 05 18:49:32 Updated: 1:xscreensaver-extras-base-5.32-4.fc21.x86_64
Feb 05 18:49:32 Updated: 1:xscreensaver-extras-5.32-4.fc21.x86_64
Feb 05 18:49:32 Updated: firewall-config-0.3.13-2.fc21.noarch
Feb 05 18:49:32 Updated: claws-mail-plugins-smime-3.11.1-3.fc21.x86_64
Feb 05 18:49:32 Updated: claws-mail-plugins-vcalendar-3.11.1-3.fc21.x86_64
Feb 05 18:49:32 Updated: claws-mail-plugins-tnef-3.11.1-3.fc21.x86_64
Feb 05 18:49:32 Updated: claws-mail-plugins-newmail-3.11.1-3.fc21.x86_64
Feb 05 18:49:32 Updated: claws-mail-plugins-fetchinfo-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-notification-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-att-remover-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-mailmbox-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-rssyl-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-attachwarner-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-archive-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: claws-mail-plugins-spam-report-3.11.1-3.fc21.x86_64
Feb 05 18:49:33 Updated: xfdashboard-0.3.8-1.fc21.x86_64
Feb 05 18:49:33 Updated: patch-2.7.4-1.fc21.x86_64
Feb 05 18:49:33 Updated: gparted-0.20.0-1.fc21.x86_64
Feb 05 18:49:33 Updated: tbb-4.3-1.20141204.fc21.x86_64
Feb 05 18:49:41 Updated: google-chrome-stable-40.0.2214.111-1.x86_64
Feb 05 18:49:41 Updated: openal-soft-1.16.0-4.fc21.x86_64
Feb 05 18:49:41 Updated: xorg-x11-drv-synaptics-1.8.1-2.fc21.x86_64
Feb 05 18:49:42 Updated: docker-io-1.4.1-8.fc21.x86_64
Feb 05 18:49:42 Updated: polkit-0.112-7.fc21.1.x86_64
Feb 07 09:22:29 Installed: kernel-core-3.18.5-201.fc21.x86_64
Feb 07 09:22:32 Installed: kernel-modules-3.18.5-201.fc21.x86_64
Feb 07 09:22:32 Installed: ocl-icd-2.0.4-3.git20131001.4ee231e.fc21.x86_64
Feb 07 09:22:33 Updated: ffmpeg-libs-2.4.6-2.fc21.x86_64
Feb 07 09:22:33 Installed: libavdevice-2.4.6-2.fc21.x86_64
Feb 07 09:22:35 Installed: kmod-VirtualBox-3.18.5-201.fc21.x86_64-4.3.20-4.fc21.2.x86_64
Feb 07 09:22:49 Updated: selinux-policy-3.13.1-105.1.fc21.noarch
Feb 07 09:22:49 Updated: kernel-tools-libs-3.18.5-201.fc21.x86_64
Feb 07 09:22:49 Updated: mplayer-common-1.1-32.20150123svn.fc21.x86_64
Feb 07 09:22:49 Updated: mplayer-1.1-32.20150123svn.fc21.x86_64
Feb 07 09:22:49 Updated: kernel-tools-3.18.5-201.fc21.x86_64
Feb 07 09:23:05 Updated: selinux-policy-targeted-3.13.1-105.1.fc21.noarch
Feb 07 09:23:05 Updated: kmod-VirtualBox-4.3.20-4.fc21.2.x86_64
Feb 07 09:23:05 Updated: ffmpeg-2.4.6-2.fc21.x86_64
Feb 07 09:23:05 Installed: kernel-3.18.5-201.fc21.x86_64
Feb 07 09:23:08 Installed: kernel-modules-extra-3.18.5-201.fc21.x86_64
Feb 07 09:23:08 Updated: rubygem-nokogiri-1.6.6.2-1.fc21.x86_64
Feb 07 09:23:23 Installed: kernel-devel-3.18.5-201.fc21.x86_64
Feb 07 09:23:23 Updated: kernel-headers-3.18.5-201.fc21.x86_64
Feb 07 09:23:23 Updated: wkhtmltopdf-0.12.2.1-1.fc21.x86_64
Feb 07 09:23:23 Erased: kmod-VirtualBox-3.17.7-300.fc21.x86_64-4.3.20-2.fc21.2.x86_64
Feb 07 09:23:26 Erased: kmod-acpi_call-3.17.7-300.fc21.x86_64-1.1.0-3.fc21.x86_64
Feb 07 09:23:28 Erased: kmod-tp_smapi-3.17.7-300.fc21.x86_64-0.41-5.fc21.x86_64
Feb 07 09:23:57 Installed: kmod-acpi_call-3.18.5-201.fc21.x86_64-1.1.0-3.fc21.x86_64
Feb 07 09:24:01 Installed: kmod-tp_smapi-3.18.5-201.fc21.x86_64-0.41-5.fc21.x86_64
Feb 09 09:21:36 Updated: postgresql-libs-9.3.6-1.fc21.x86_64
Feb 09 09:21:36 Updated: postgresql-9.3.6-1.fc21.x86_64
Feb 09 09:21:36 Updated: libdrm-2.4.59-4.fc21.x86_64
Feb 09 09:21:36 Updated: libdrm-devel-2.4.59-4.fc21.x86_64
Feb 09 09:21:37 Updated: postgresql-contrib-9.3.6-1.fc21.x86_64
Feb 09 09:21:37 Updated: postgresql-server-9.3.6-1.fc21.x86_64
Feb 09 09:21:37 Updated: 1:lpf-flash-plugin-11.2.202.442-1.fc21.x86_64
Feb 09 09:21:38 Updated: imlib2-1.4.6-3.fc21.x86_64
Feb 09 09:21:38 Updated: libgadu-1.12.1-1.fc21.x86_64
Feb 09 09:21:38 Updated: 1:perl-Digest-SHA-5.95-1.fc21.x86_64
Feb 09 09:21:38 Updated: 2:qemu-guest-agent-2.1.3-1.fc21.x86_64
Feb 09 09:21:39 Updated: 2:gedit-3.14.3-1.fc21.x86_64
Feb 09 09:21:39 Updated: xorg-x11-drv-synaptics-1.8.1-3.fc21.x86_64
Feb 09 09:21:39 Updated: libdrm-2.4.59-4.fc21.i686
这些升级的软件包之一可能与docker发生了某种冲突。我也尝试切换到几个不同的内核版本,例如3.18.5-201.fc21.x86_64、3.18.3-201.fc21.x86_64和3.17.8-300.fc21.x86_64,但结果是相同的。
我被要求将解决方案作为答案发布,就在这里。
好的,我发现了问题所在-/etc/sysconfig/docker
当然是我的docker config 。我采取步骤找出来:
/var/lib/docker/
为允许docker重新创建其文件结构(我在阅读https://bugzilla.redhat.com/show_bug.cgi?id=1099375后决定尝试使用该文件结构)-这有助于sudo systemctl docker start
无错误运行,-H fd:// -H tcp://0.0.0.0:2376
似乎只是boot2docker所需的一些设置(我的同伴在MacOS和Windows上使用b2d),-s overlay
运行选项。它解决了问题。它也适用于先前的/var/lib/docker/
目录(至少我不必再次下载所有容器)。
@marekgoldmann也向我指出这个问题- https://bugzilla.redhat.com/show_bug.cgi?id=1186669#c2特别是其在Bugzilla的解释。感谢Marek的帮助!:)
如果您遇到与Docker非常相似的问题,我希望这篇文章对您有所帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句