最近我docker在本地Fedora 21上的服务停止了工作.当我尝试使用以下命令运行守护程序时:
sudo systemctl start docker
Run Code Online (Sandbox Code Playgroud)
它结束于:
Job for docker.service failed. See "systemctl status docker.service" and "journalctl -xe" for details.
Run Code Online (Sandbox Code Playgroud)
检查泊坞窗状态 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.
Run Code Online (Sandbox Code Playgroud)
事实证明,没有/var/run/docker.sock套接字,在启动docker服务时无法创建.如果我尝试运行它:
sudo docker -d
Run Code Online (Sandbox Code Playgroud)
它结束于:
[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
Run Code Online (Sandbox Code Playgroud)
添加-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
Run Code Online (Sandbox Code Playgroud)
它在几天前工作,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
Run Code Online (Sandbox Code Playgroud)
我的问题是:问题的根源可能是什么?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
Run Code Online (Sandbox Code Playgroud)
关于我的OS的更多细节:
Fedora 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:我之前的泊坞版是:
Dec 15 20:34:33 Updated: docker-io-1.4.0-1.fc21.x86_64
Run Code Online (Sandbox Code Playgroud)
事实证明这个问题与此无关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
Run Code Online (Sandbox Code Playgroud)
其中一个升级的软件包可能会与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配置.我找到的步骤:
/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非常相似的问题,我希望这篇文章可以帮助你.
| 归档时间: |
|
| 查看次数: |
3483 次 |
| 最近记录: |