Docker 1.4.1无法在Fedora 21上启动:FATA [0000] EOF

时间:2015-02-09 10:03:56

标签: docker fedora

最近我在本地Fedora 21上的docker服务停止了工作。当我尝试使用以下命令运行守护程序时:

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几天前运行顺利。根据{{​​1}}

,2月5日docker-io的更新发生了变化
yum.log

关于我的操作系统的更多细节:

Fedora 21 [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

Docker 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

PS:我之前的泊坞版本是:

Docker version 1.4.1, build 5bc2ff8/1.4.1

更新

事实证明这个问题与Dec 15 20:34:33 Updated: docker-io-1.4.0-1.fc21.x86_64 无关,我已经尝试降级到1.4.0和1.3.2,结果相同。我检查了我的日志,最后一次工作肯定是在2月4日。从那时起,更新了几个软件包,这里是yum.log的完整列表:

docker-1.4.1

其中一个升级包可能与docker发生冲突。我也试过切换到几个不同的内核版本,例如3.18.5-201.fc21.x86_64,3.18.3-201.fc21.x86_64和3.17.8-300.fc21.x86_64但结果是一样的。

1 个答案:

答案 0 :(得分:6)

我被要求将解决方案作为答案发布,所以就是这样。

好的,我发现问题是什么 - 当然是我/etc/sysconfig/docker中的docker配置。我找到的步骤:

  • 首先,我重命名/var/lib/docker/以允许docker重新创建其文件结构(我决定在阅读https://bugzilla.redhat.com/show_bug.cgi?id=1099375之后尝试一下) - 这有助于sudo systemctl docker start无误地运行,< / LI>
  • 但在我这样做之前我重新安装了docker,所以我以前的docker设置丢失了 - 我添加了它们并重启:它失败了,
  • 我必须删除-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非常相似的问题,我希望这篇文章可以帮到你。