CentOS 7 - daemon do docker não está iniciando

2

Estou tentando aprender Docker . Eu era capaz de emitir comandos docker quando eu acabei de instalá-lo no entanto depois que eu reiniciar minha estação de trabalho não posso mais executar docker comandos mais. Percebi que docker daemon / service não estava sendo executado, então tentei iniciá-lo, mas não consegui:

[alexus@wcmisdlin02 ~]$ sudo systemctl start docker
[sudo] password for alexus: 
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
[alexus@wcmisdlin02 ~]$ sudo systemctl status docker
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: failed (Result: timeout) since Sun 2015-09-13 16:35:48 EDT; 49s ago
     Docs: http://docs.docker.com
 Main PID: 549

Sep 13 16:34:18 wcmisdlin02.uftmasterad.org docker[549]: time="2015-09-13T16:34:18.194322255-04:00" level=info msg="Listening for HTTP on unix (/var/run/docker.sock)"
Sep 13 16:34:18 wcmisdlin02.uftmasterad.org docker[549]: time="2015-09-13T16:34:18.379197462-04:00" level=error msg="WARNING: No --storage-opt dm.thinpooldev specified, using loopback; this configuration is strongly dis... production use"
Sep 13 16:34:18 wcmisdlin02.uftmasterad.org docker[549]: time="2015-09-13T16:34:18.731795504-04:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Sep 13 16:34:18 wcmisdlin02.uftmasterad.org docker[549]: time="2015-09-13T16:34:18.782541438-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with message: , error: exit status 1"
Sep 13 16:35:48 wcmisdlin02.uftmasterad.org systemd[1]: docker.service operation timed out. Terminating.
Sep 13 16:35:48 wcmisdlin02.uftmasterad.org systemd[1]: Failed to start Docker Application Container Engine.
Sep 13 16:35:48 wcmisdlin02.uftmasterad.org systemd[1]: Unit docker.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[alexus@wcmisdlin02 ~]$ journalctl -xn
No journal files were found.
[alexus@wcmisdlin02 ~]$ rpm -q docker docker-selinux
docker-1.7.1-108.el7.centos.x86_64
docker-selinux-1.7.1-108.el7.centos.x86_64
[alexus@wcmisdlin02 ~]$ cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core) 
[alexus@wcmisdlin02 ~]$ uname -a
Linux wcmisdlin02.uftmasterad.org 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[alexus@wcmisdlin02 ~]$ 

* UPDATE *

[alexus@wcmisdlin02 ~]$ sudo modprobe bridge
[alexus@wcmisdlin02 ~]$ sudo modprobe nf_nat
[alexus@wcmisdlin02 ~]$ sudo modprobe br_netfilter
modprobe: FATAL: Module br_netfilter not found.
[alexus@wcmisdlin02 ~]$ 

* UPDATE # 2 *

[alexus@wcmisdlin02 ~]$ getenforce 
Enforcing
[alexus@wcmisdlin02 ~]$ sudo setenforce 0
[alexus@wcmisdlin02 ~]$ sudo systemctl start docker
[alexus@wcmisdlin02 ~]$ sudo systemctl status docker
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: active (running) since Sun 2015-09-13 18:27:23 EDT; 4s ago
     Docs: http://docs.docker.com
 Main PID: 3317 (docker)
   CGroup: /system.slice/docker.service
           └─3317 /usr/bin/docker -d --selinux-enabled

Sep 13 18:27:22 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:22.792673926-04:00" level=error msg="WARNING: No --storage-opt dm.thinpooldev specified, using loopback; this configuration is strongly dis...production use"
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.139976126-04:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.220898568-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with message: , error: exit status 1"
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.245690245-04:00" level=info msg="Firewalld running: true"
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.853155213-04:00" level=info msg="Loading containers: start."
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: ......
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.920468550-04:00" level=info msg="Loading containers: done."
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.920491990-04:00" level=info msg="Daemon has completed initialization"
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org docker[3317]: time="2015-09-13T18:27:23.920513457-04:00" level=info msg="Docker daemon" commit="3043001/1.7.1" execdriver=native-0.2 graphdriver=devicemapper version=1.7.1
Sep 13 18:27:23 wcmisdlin02.uftmasterad.org systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
[alexus@wcmisdlin02 ~]$ 
    
por alexus 13.09.2015 / 22:46

1 resposta

1

Este não é um problema com os módulos do kernel, nem tem nada a ver com o firewalld. A solução é instalar o pacote docker-selinux e reinicializar (possivelmente carregando o arquivo de políticas com semodule -i antes de fazer isso).

    
por 12.10.2015 / 22:49

Tags