Skip to content

1.8.0: Systemd can't start docker on Centos 7.1 #15498

Closed

Description

@abierbaum

Using the default configuration of the latest docker 1.8.0 release, systemd can't start docker.
Workaround: yum install docker-selinux

Use the commands below to provide key information from your environment:

docker version: 1.8.0-1
docker info: N/A
uname -a: Linux cent7 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Provide additional environment details (AWS, VirtualBox, physical, etc.):

Reproduction:

[root@cent7 ~]# uname -a
Linux cent7 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@cent7 ~]# rpm -qa | grep docker
[root@cent7 ~]# yum install -y http://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.8.0-1.el7.centos.x86_64.rpm
Loaded plugins: fastestmirror
docker-engine-1.8.0-1.el7.centos.x86_64.rpm                                                                                            | 6.2 MB  00:00:03     
Examining /var/tmp/yum-root-ctX5iw/docker-engine-1.8.0-1.el7.centos.x86_64.rpm: docker-engine-1.8.0-1.el7.centos.x86_64
Marking /var/tmp/yum-root-ctX5iw/docker-engine-1.8.0-1.el7.centos.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.8.0-1.el7.centos will be installed
--> Processing Dependency: libcgroup for package: docker-engine-1.8.0-1.el7.centos.x86_64
Loading mirror speeds from cached hostfile
 * base: mirror.evolvedservers.com
 * extras: centos.mbni.med.umich.edu
 * updates: mirror.cc.columbia.edu
--> Running transaction check
---> Package libcgroup.x86_64 0:0.41-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================
 Package                        Arch                    Version                               Repository                                                 Size
==============================================================================================================================================================
Installing:
 docker-engine                  x86_64                  1.8.0-1.el7.centos                    /docker-engine-1.8.0-1.el7.centos.x86_64                   27 M
Installing for dependencies:
 libcgroup                      x86_64                  0.41-8.el7                            base                                                       64 k

Transaction Summary
==============================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total size: 27 M
Total download size: 64 k
Installed size: 27 M
Downloading packages:
libcgroup-0.41-8.el7.x86_64.rpm                                                                                                    |  64 kB  00:00:15     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libcgroup-0.41-8.el7.x86_64                                                                                                            1/2 
  Installing : docker-engine-1.8.0-1.el7.centos.x86_64                                                                                                2/2 
  Verifying  : docker-engine-1.8.0-1.el7.centos.x86_64                                                                                                1/2 
  Verifying  : libcgroup-0.41-8.el7.x86_64                                                                                                            2/2 

Installed:
  docker-engine.x86_64 0:1.8.0-1.el7.centos                                                                                                               

Dependency Installed:
  libcgroup.x86_64 0:0.41-8.el7                                                                                                                           

Complete!

[root@cent7 ~]# systemctl status docker
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com
[root@cent7 ~]# systemctl start docker
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
[root@cent7 ~]# journalctl -xn
-- Logs begin at Sun 2015-07-12 09:27:56 EDT, end at Sun 2015-07-12 09:34:04 EDT. --
Jul 12 09:32:34 cent7 systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has begun starting up.
Jul 12 09:32:34 cent7 systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Jul 12 09:32:34 cent7 systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has begun starting up.
Jul 12 09:32:34 cent7 kernel: loop: module loaded
Jul 12 09:32:40 cent7 docker[2603]: time="2015-07-12T09:32:40.871943813-04:00" level=info msg="Option DefaultDriver: bridge"
Jul 12 09:32:40 cent7 docker[2603]: time="2015-07-12T09:32:40.872733230-04:00" level=info msg="Option DefaultNetwork: bridge"
Jul 12 09:32:40 cent7 docker[2603]: time="2015-07-12T09:32:40.896696252-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with messag
Jul 12 09:34:04 cent7 systemd[1]: docker.service operation timed out. Terminating.
Jul 12 09:34:04 cent7 systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Jul 12 09:34:04 cent7 systemd[1]: Unit docker.service entered failed state.

Expected to see docker package install correctly by default and allow using systemd to startup docker on the machine.

This is running inside a fresh install of Centos 7.1 inside virtualbox. Docker 1.7.1 works with no issue.

Activity

  1. thaJeztah commented on Aug 11, 2015

    @thaJeztah
    Member
  2. jessfraz commented on Aug 11, 2015

    @jessfraz
    Contributor

    it looks like the daemon failed to start w something about the bridge ping @mavenugo @mrjana

  3. jessfraz commented on Aug 11, 2015

    @jessfraz
    Contributor

    did you do an yum update before

  4. jessfraz commented on Aug 11, 2015

    @jessfraz
    Contributor

    I cant reproduce on a centos 7 machine I want to say it has something to do with kernel config

  5. mrjana commented on Aug 12, 2015

    @mrjana
    Contributor

    @jfrazelle You can ignore the bridge modprobe failure message. That will be printed if the bridge module is compiled into the kernel rather than as a module. We should rather check the docker logs.

  6. jessfraz commented on Aug 12, 2015

    @jessfraz
    Contributor

    Those were the logs :/

    On Aug 11, 2015, at 17:21, Jana Radhakrishnan [email protected] wrote:

    @jfrazelle You can ignore the bridge modprobe failure message. That will be printed if the bridge module is compiled into the kernel rather than as a module. We should rather check the docker logs.

    —
    Reply to this email directly or view it on GitHub.

  7. abierbaum commented on Aug 12, 2015

    @abierbaum
    Author

    @jfrazelle I just ran check config and yum update.

    [root@cent7 ~]# ./check-config.sh 
    warning: /proc/config.gz does not exist, searching other paths for kernel config ...
    info: reading kernel config from /boot/config-3.10.0-229.7.2.el7.x86_64 ...
    
    Generally Necessary:
    - cgroup hierarchy: properly mounted [/sys/fs/cgroup]
    - CONFIG_NAMESPACES: enabled
    - CONFIG_NET_NS: enabled
    - CONFIG_PID_NS: enabled
    - CONFIG_IPC_NS: enabled
    - CONFIG_UTS_NS: enabled
    - CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
    - CONFIG_CGROUPS: enabled
    - CONFIG_CGROUP_CPUACCT: enabled
    - CONFIG_CGROUP_DEVICE: enabled
    - CONFIG_CGROUP_FREEZER: enabled
    - CONFIG_CGROUP_SCHED: enabled
    - CONFIG_CPUSETS: enabled
    - CONFIG_MEMCG: enabled
    - CONFIG_MACVLAN: enabled (as module)
    - CONFIG_VETH: enabled (as module)
    - CONFIG_BRIDGE: enabled (as module)
    - CONFIG_BRIDGE_NETFILTER: enabled
    - CONFIG_NF_NAT_IPV4: enabled (as module)
    - CONFIG_IP_NF_FILTER: enabled (as module)
    - CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
    - CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
    - CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
    - CONFIG_NF_NAT: enabled (as module)
    - CONFIG_NF_NAT_NEEDED: enabled
    - CONFIG_POSIX_MQUEUE: enabled
    
    Optional Features:
    - CONFIG_MEMCG_KMEM: enabled
    - CONFIG_MEMCG_SWAP: enabled
    - CONFIG_MEMCG_SWAP_ENABLED: enabled
    - CONFIG_RESOURCE_COUNTERS: enabled
    - CONFIG_BLK_CGROUP: enabled
    - CONFIG_IOSCHED_CFQ: enabled
    - CONFIG_CGROUP_PERF: enabled
    - CONFIG_CGROUP_HUGETLB: enabled
    - CONFIG_NET_CLS_CGROUP: enabled
    - CONFIG_NETPRIO_CGROUP: enabled (as module)
    - CONFIG_CFS_BANDWIDTH: enabled
    - CONFIG_FAIR_GROUP_SCHED: enabled
    - CONFIG_RT_GROUP_SCHED: enabled
    - CONFIG_EXT3_FS: missing
    - CONFIG_EXT3_FS_XATTR: missing
    - CONFIG_EXT3_FS_POSIX_ACL: missing
    - CONFIG_EXT3_FS_SECURITY: missing
        (enable these ext3 configs if you are using ext3 as backing filesystem)
    - CONFIG_EXT4_FS: enabled (as module)
    - CONFIG_EXT4_FS_POSIX_ACL: enabled
    - CONFIG_EXT4_FS_SECURITY: enabled
    - Storage Drivers:
      - "aufs":
        - CONFIG_AUFS_FS: missing
      - "btrfs":
        - CONFIG_BTRFS_FS: enabled (as module)
      - "devicemapper":
        - CONFIG_BLK_DEV_DM: enabled (as module)
        - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
      - "overlay":
        - CONFIG_OVERLAY_FS: enabled (as module)
      - "zfs":
        - /dev/zfs: missing
        - zfs command: missing
        - zpool command: missing
    
    [root@cent7 ~]# yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.lug.udel.edu
     * extras: centos.mbni.med.umich.edu
     * updates: mirror.cc.columbia.edu
    No packages marked for update
    [root@cent7 ~]#  uname -a
    Linux cent7 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    [root@cent7 ~]# cat /etc/redhat-release 
    CentOS Linux release 7.1.1503 (Core) 
    

    Anything else I can try to help collect more information to debug this? (in the morning I could try the same reproduction on a couple of cloud hosts to see how it works out)

  8. abierbaum commented on Aug 12, 2015

    @abierbaum
    Author

    I just tried the same reproduction on a DigitalOcean RH7 droplet and docker worked fine.

    Everything looks good there.

    uname -a: Linux rh7test 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Sep 22 19:06:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    Still trying to determine why running in centos 7 minimal with updates inside of a virtualbox is failing.

  9. KalleDK commented on Aug 12, 2015

    @KalleDK

    Same problem with centos 7 inside VMware Player

    Centos 7 minimal install

    uname -a
    Linux cento7 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
    yum update
    yum install git
    curl -sSL https://get.docker.com/ -# | sh
    

    Logs

    [root@cento ~]# curl -sSL https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh > check-config.sh
    [root@cento ~]# chmod +x check-config.sh
    [root@cento ~]# ./check-config.sh
    warning: /proc/config.gz does not exist, searching other paths for kernel config ...
    info: reading kernel config from /boot/config-3.10.0-229.11.1.el7.x86_64 ...
    
    Generally Necessary:
    - cgroup hierarchy: properly mounted [/sys/fs/cgroup]
    - CONFIG_NAMESPACES: enabled
    - CONFIG_NET_NS: enabled
    - CONFIG_PID_NS: enabled
    - CONFIG_IPC_NS: enabled
    - CONFIG_UTS_NS: enabled
    - CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
    - CONFIG_CGROUPS: enabled
    - CONFIG_CGROUP_CPUACCT: enabled
    - CONFIG_CGROUP_DEVICE: enabled
    - CONFIG_CGROUP_FREEZER: enabled
    - CONFIG_CGROUP_SCHED: enabled
    - CONFIG_CPUSETS: enabled
    - CONFIG_MEMCG: enabled
    - CONFIG_MACVLAN: enabled (as module)
    - CONFIG_VETH: enabled (as module)
    - CONFIG_BRIDGE: enabled (as module)
    - CONFIG_BRIDGE_NETFILTER: enabled
    - CONFIG_NF_NAT_IPV4: enabled (as module)
    - CONFIG_IP_NF_FILTER: enabled (as module)
    - CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
    - CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
    - CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
    - CONFIG_NF_NAT: enabled (as module)
    - CONFIG_NF_NAT_NEEDED: enabled
    - CONFIG_POSIX_MQUEUE: enabled
    
    Optional Features:
    - CONFIG_MEMCG_KMEM: enabled
    - CONFIG_MEMCG_SWAP: enabled
    - CONFIG_MEMCG_SWAP_ENABLED: enabled
    - CONFIG_RESOURCE_COUNTERS: enabled
    - CONFIG_BLK_CGROUP: enabled
    - CONFIG_IOSCHED_CFQ: enabled
    - CONFIG_CGROUP_PERF: enabled
    - CONFIG_CGROUP_HUGETLB: enabled
    - CONFIG_NET_CLS_CGROUP: enabled
    - CONFIG_NETPRIO_CGROUP: enabled (as module)
    - CONFIG_CFS_BANDWIDTH: enabled
    - CONFIG_FAIR_GROUP_SCHED: enabled
    - CONFIG_RT_GROUP_SCHED: enabled
    - CONFIG_EXT3_FS: missing
    - CONFIG_EXT3_FS_XATTR: missing
    - CONFIG_EXT3_FS_POSIX_ACL: missing
    - CONFIG_EXT3_FS_SECURITY: missing
        (enable these ext3 configs if you are using ext3 as backing filesystem)
    - CONFIG_EXT4_FS: enabled (as module)
    - CONFIG_EXT4_FS_POSIX_ACL: enabled
    - CONFIG_EXT4_FS_SECURITY: enabled
    - Storage Drivers:
      - "aufs":
        - CONFIG_AUFS_FS: missing
      - "btrfs":
        - CONFIG_BTRFS_FS: enabled (as module)
      - "devicemapper":
        - CONFIG_BLK_DEV_DM: enabled (as module)
        - CONFIG_DM_THIN_PROVISIONING: enabled (as module)
      - "overlay":
        - CONFIG_OVERLAY_FS: enabled (as module)
      - "zfs":
        - /dev/zfs: missing
        - zfs command: missing
        - zpool command: missing
    
  10. abierbaum commented on Aug 12, 2015

    @abierbaum
    Author

    When I run docker daemon directly from the command line I have no issue:

    [root@cent7 ~]# docker daemon
    INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
    INFO[0000] [graphdriver] using prior storage driver "devicemapper" 
    INFO[0000] Option DefaultDriver: bridge                 
    INFO[0000] Option DefaultNetwork: bridge                
    WARN[0000] Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.
    , error: exit status 1 
    INFO[0000] Firewalld running: true                      
    INFO[0000] Loading containers: start.                   
    
    INFO[0000] Loading containers: done.                    
    INFO[0000] Daemon has completed initialization          
    INFO[0000] Docker daemon                                 commit=0d03096 execdriver=native-0.2 graphdriver=devicemapper version=1.8.0
    

    I added the -D debug option to the options passed through systemd, but I can't find where the additional output is going. Anyone with more experience with systemd that can point me in the right direction to provide additional details?

  11. KalleDK commented on Aug 12, 2015

    @KalleDK

    My guess is firewall rules

    Installed:
      docker-engine.x86_64 0:1.8.0-1.el7.centos
    
    Complete!
    [root@cento ~]# service firewalld stop
    Redirecting to /bin/systemctl stop  firewalld.service
    [root@cento ~]# service docker start
    Starting docker (via systemctl):                           [  OK  ]
    [root@cento ~]#
    
    [root@cento log]# cat firewalld
    2015-08-12 15:35:34 WARNING: iptables not usable, disabling IPv4 firewall.
    
    
  12. KalleDK commented on Aug 12, 2015

    @KalleDK

    I can have firewalld running and then start the docker service one time now.. but it will fail if i restart it

    [root@cento log]# service firewalld stop
    Redirecting to /bin/systemctl stop  firewalld.service
    [root@cento log]# systemctl daemon-reload
    [root@cento log]# service firewalld start
    Redirecting to /bin/systemctl start  firewalld.service
    [root@cento log]# service docker start
    Starting docker (via systemctl):                           [  OK  ]
    [root@cento log]# service docker stop
    Stopping docker (via systemctl):                           [  OK  ]
    [root@cento log]# service docker start
    Starting docker (via systemctl):  ^C
    Fail
    
  13. abierbaum commented on Aug 12, 2015

    @abierbaum
    Author

    I have verified that I can systemctl start docker on both a softlayer instance and a digitalocean instance. It will run even if firewalld is also running.

    When running inside a virtualbox VM though:

    • Docker service fails to run if firewalld is running
    • Docker service runs fine if firewalld is stopped

    I am still trying to collect more details and will post them here when I get them. In the meantime the only thing I can think of is that the VM I am using has multiple network interfaces configured (one bridged and one host-only), maybe that is causing some of the issue.

    When running systemctl start docker with the "-D" option send to the daemon, this is the output from journalctl --unit=docker after a fresh install and start.

    [root@cent7 ~]# journalctl --unit=docker
    -- Logs begin at Sun 2015-07-12 09:27:56 EDT, end at Sun 2015-07-12 09:33:09 EDT. --
    Jul 12 09:31:39 cent7 systemd[1]: Starting Docker Application Container Engine...
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.156651676-04:00" level=debug msg="Registering POST, /containers/{name:.*}/wait"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157097337-04:00" level=debug msg="Registering POST, /containers/{name:.*}/attach"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157270408-04:00" level=debug msg="Registering POST, /containers/{name:.*}/copy"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157457427-04:00" level=debug msg="Registering POST, /containers/{name:.*}/exec"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157650664-04:00" level=debug msg="Registering POST, /exec/{name:.*}/start"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157832599-04:00" level=debug msg="Registering POST, /auth"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.157945893-04:00" level=debug msg="Registering POST, /build"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.158055445-04:00" level=debug msg="Registering POST, /images/load"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.158176852-04:00" level=debug msg="Registering POST, /images/{name:.*}/push"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.158390535-04:00" level=debug msg="Registering POST, /images/{name:.*}/tag"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.158554996-04:00" level=debug msg="Registering POST, /containers/{name:.*}/pause"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.158731636-04:00" level=debug msg="Registering POST, /containers/{name:.*}/rename"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.159037126-04:00" level=debug msg="Registering POST, /commit"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.160310382-04:00" level=debug msg="Registering POST, /images/create"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.160425682-04:00" level=debug msg="Registering POST, /exec/{name:.*}/resize"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.160561889-04:00" level=debug msg="Registering POST, /containers/{name:.*}/unpause"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.160819377-04:00" level=debug msg="Registering POST, /containers/{name:.*}/restart"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161038621-04:00" level=debug msg="Registering POST, /containers/{name:.*}/start"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161191205-04:00" level=debug msg="Registering POST, /containers/{name:.*}/stop"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161325266-04:00" level=debug msg="Registering POST, /containers/{name:.*}/resize"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161487803-04:00" level=debug msg="Registering POST, /containers/create"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161611652-04:00" level=debug msg="Registering POST, /containers/{name:.*}/kill"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.161870425-04:00" level=debug msg="Registering PUT, /containers/{name:.*}/archive"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162036512-04:00" level=debug msg="Registering DELETE, /containers/{name:.*}"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162232696-04:00" level=debug msg="Registering DELETE, /images/{name:.*}"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162381655-04:00" level=debug msg="Registering OPTIONS, "
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162403718-04:00" level=debug msg="Registering HEAD, /containers/{name:.*}/archive"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162587523-04:00" level=debug msg="Registering GET, /images/get"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162692701-04:00" level=debug msg="Registering GET, /images/{name:.*}/get"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.162929255-04:00" level=debug msg="Registering GET, /images/{name:.*}/history"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163080909-04:00" level=debug msg="Registering GET, /containers/json"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163210966-04:00" level=debug msg="Registering GET, /containers/{name:.*}/export"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163387320-04:00" level=debug msg="Registering GET, /containers/{name:.*}/json"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163538585-04:00" level=debug msg="Registering GET, /events"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163649548-04:00" level=debug msg="Registering GET, /images/search"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.163747586-04:00" level=debug msg="Registering GET, /containers/{name:.*}/archive"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166128998-04:00" level=debug msg="Registering GET, /containers/{name:.*}/logs"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166265922-04:00" level=debug msg="Registering GET, /containers/{name:.*}/stats"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166399473-04:00" level=debug msg="Registering GET, /exec/{id:.*}/json"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166516561-04:00" level=debug msg="Registering GET, /info"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166597340-04:00" level=debug msg="Registering GET, /containers/{name:.*}/top"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.166917942-04:00" level=debug msg="Registering GET, /images/{name:.*}/json"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167038751-04:00" level=debug msg="Registering GET, /containers/{name:.*}/attach/ws"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167211266-04:00" level=debug msg="Registering GET, /_ping"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167303479-04:00" level=debug msg="Registering GET, /images/json"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167391986-04:00" level=debug msg="Registering GET, /containers/{name:.*}/changes"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167546694-04:00" level=debug msg="Registering GET, /version"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.167637206-04:00" level=debug msg="Registering GET, /containers/ps"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.175458833-04:00" level=debug msg="[zfs] zfs command is not available: exec: \"zfs\": executable file not found in $PATH"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.177909273-04:00" level=debug msg="devicemapper: driver version is 4.29.0"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.178716443-04:00" level=debug msg="Generated prefix: docker-253:0-25806612"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.178849825-04:00" level=debug msg="Checking for existence of the pool 'docker-253:0-25806612-pool'"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.179127154-04:00" level=debug msg="Pool doesn't exist. Creating it."
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.179210298-04:00" level=debug msg="Creating loopback file /var/lib/docker/devicemapper/devicemapper/data for device-manage use"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.194921345-04:00" level=debug msg="Creating loopback file /var/lib/docker/devicemapper/devicemapper/metadata for device-manage use"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.284876481-04:00" level=debug msg="Initializing base device-mapper thin volume"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.287151128-04:00" level=debug msg="[devmapper] CreateDevice(poolName=/dev/mapper/docker-253:0-25806612-pool, deviceId=1)"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.297993226-04:00" level=debug msg="Registering device (id 1) with FS size 107374182400"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.298074973-04:00" level=debug msg="registerDevice(1, )"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.304941672-04:00" level=debug msg="Creating filesystem on base device-mapper thin volume"
    Jul 12 09:31:39 cent7 docker[2615]: time="2015-07-12T09:31:39.305006026-04:00" level=debug msg="activateDeviceIfNeeded()"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.241468012-04:00" level=debug msg="activateDeviceIfNeeded()"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.282646583-04:00" level=debug msg="UUID for device: /dev/mapper/docker-253:0-25806612-base is:34c1090e-618f-4c87-aec3-538c8126cf31"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.287904728-04:00" level=debug msg="[devmapper] deactivateDevice()"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.291703185-04:00" level=debug msg="[devmapper] removeDevice START(docker-253:0-25806612-base)"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.320139142-04:00" level=debug msg="[devmapper] removeDevice END(docker-253:0-25806612-base)"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.320187455-04:00" level=debug msg="[devmapper] deactivateDevice END()"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.325096430-04:00" level=debug msg="Using graph driver devicemapper"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.325145999-04:00" level=debug msg="Using default logging driver json-file"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.329322694-04:00" level=debug msg="Creating images graph"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.332252629-04:00" level=debug msg="Restored 0 elements"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.338474243-04:00" level=debug msg="Creating repository list"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.338616554-04:00" level=info msg="Option DefaultDriver: bridge"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.338650426-04:00" level=info msg="Option DefaultNetwork: bridge"
    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.363185154-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.\n, error: exit status 1"
    Jul 12 09:33:09 cent7 systemd[1]: docker.service operation timed out. Terminating.
    Jul 12 09:33:09 cent7 systemd[1]: Failed to start Docker Application Container Engine.
    Jul 12 09:33:09 cent7 systemd[1]: Unit docker.service entered failed state.
    

    If I stop firewalld, then docker can startup with no problem.

    This line in the output looks suspicious to me:

    Jul 12 09:31:45 cent7 docker[2615]: time="2015-07-12T09:31:45.363185154-04:00" level=warning msg="Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.\n, error: exit status 1"

    Is there a module or package that I need to have installed in addition to docker in order for it to work with firewalld?

  14. squeaky-pl commented on Aug 12, 2015

    @squeaky-pl

    I am also affected by this. Docker 1.7 from main repo used to function until I updated today to 1.8. I run Centos 7 minimal install inside virtualbox.

    journalctl shows me this:

    Aug 12 13:36:02 elena systemd[1]: Starting Docker Application Container Engine...
    Aug 12 13:36:02 elena docker[3176]: time="2015-08-12T13:36:02.265776221Z" level=info msg="[graphdriver] using prior storage driver 
    Aug 12 13:36:02 elena docker[3176]: time="2015-08-12T13:36:02.266449050Z" level=info msg="Option DefaultDriver: bridge"
    Aug 12 13:36:02 elena docker[3176]: time="2015-08-12T13:36:02.266473946Z" level=info msg="Option DefaultNetwork: bridge"
    Aug 12 13:36:02 elena docker[3176]: time="2015-08-12T13:36:02.274134316Z" level=warning msg="Running modprobe bridge nf_nat br_netf
    Aug 12 13:37:32 elena systemd[1]: docker.service operation timed out. Terminating.
    Aug 12 13:37:32 elena systemd[1]: Failed to start Docker Application Container Engine.
    Aug 12 13:37:32 elena systemd[1]: Unit docker.service entered failed state.
    

    however if i stop the firewall

    systemctl stop firewalld
    

    I can start Docker daemon without problems

  15. 102 remaining items

  16. EslamElHusseiny commented on Nov 6, 2015

    @EslamElHusseiny

    I've tried docker-engine 1.9 on CentOS 7.1 AMI but it didn't work.

    • docker-engine version docker-engine-1.9.0-1.el7.centos.x86_64
    • docker-engine-selinux version docker-engine-selinux-1.9.0-1.el7.centos.noarch
    • kernel version 3.10.0-229.20.1.el7.x86_64
    • CentOS version CentOS Linux release 7.1.1503 (Core)
      /var/log/messages :
    docker: time="2015-11-06T13:55:44.541130521Z" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
    systemd: docker.service operation timed out. Terminating.
    systemd: Failed to start Docker Application Container Engine.
    systemd: Unit docker.service entered failed state.
    
  17. rjsm commented on Nov 12, 2015

    @rjsm

    I see the same thing as @EslamElHusseiny. It appears the storage is just too slow in AWS and times out. Running it manually fixes that then starting via systemd works.

    ERRO[0000] WARNING: No --storage-opt dm.thinpooldev specified, using loopback; this configuration is strongly discouraged for production use
    DEBU[0000] [devmapper]: poolDataMajMin=7:0 poolMetaMajMin=7:1

    DEBU[0002] [deviceset] constructDeviceIdMap()
    DEBU[0002] Loading data for file /var/lib/docker/devicemapper/metadata/base
    DEBU[0002] Added deviceId=1 to DeviceIdMap
    DEBU[0002] Loading data for file /var/lib/docker/devicemapper/metadata/transaction-metadata
    DEBU[0002] Added deviceId=1 to DeviceIdMap
    DEBU[0002] [deviceset] constructDeviceIdMap() END
    DEBU[0002] Removing uninitialized base image
    DEBU[0002] activateDeviceIfNeeded()
    DEBU[0017] [devmapper] removeDevice START(docker-202:1-2059595-base)
    DEBU[0017] [devmapper] removeDevice END(docker-202:1-2059595-base)
    DEBU[0017] unregisterDevice(1, )
    DEBU[0017] Initializing base device-mapper thin volume
    DEBU[0017] [devmapper] CreateDevice(poolName=/dev/mapper/docker-202:1-2059595-pool, deviceId=1)
    DEBU[0017] Registering device (id 1) with FS size 107374182400
    DEBU[0017] registerDevice(1, )
    DEBU[0017] Creating filesystem on base device-mapper thin volume
    DEBU[0017] activateDeviceIfNeeded()
    DEBU[0104] activateDeviceIfNeeded()
    DEBU[0104] UUID for device: /dev/mapper/docker-202:1-2059595-base is:ce4b3dde-71ed-4f3e-9e3a-aec833f624b5
    DEBU[0104] [devmapper] deactivateDevice()
    DEBU[0104] [devmapper] removeDevice START(docker-202:1-2059595-base)
    DEBU[0104] [devmapper] removeDevice END(docker-202:1-2059595-base)
    DEBU[0104] [devmapper] deactivateDevice END()
    INFO[0104] [graphdriver] using prior storage driver "devicemapper"
    DEBU[0104] Using graph driver devicemapper
    DEBU[0104] Using default logging driver json-file
    DEBU[0104] SELinux enabled successfully
    DEBU[0104] Creating images graph
    DEBU[0104] Restored 0 elements
    DEBU[0104] Creating repository list
    INFO[0104] Option DefaultDriver: bridge
    INFO[0104] Option DefaultNetwork: bridge
    WARN[0105] Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.
    insmod /lib/modules/3.10.0-229.20.1.el7.x86_64/kernel/net/llc/llc.ko
    insmod /lib/modules/3.10.0-229.20.1.el7.x86_64/kernel/net/802/stp.ko
    insmod /lib/modules/3.10.0-229.20.1.el7.x86_64/kernel/net/bridge/bridge.ko
    insmod /lib/modules/3.10.0-229.20.1.el7.x86_64/kernel/net/netfilter/nf_nat.ko
    , error: exit status 1
    INFO[0105] Firewalld running: false
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -D PREROUTING]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -D OUTPUT]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -F DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -X DOCKER]
    DEBU[0105] Failed to Initialize Datastore due to datastore initialization requires a valid configuration. Operating in non-clustered mode
    DEBU[0105] Setting bridge mac address to 02:42:9d:02:5a:c2
    DEBU[0105] Creating bridge interface "docker0" with network 172.17.42.1/16
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -I POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE]
    DEBU[0105] /usr/sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j DROP]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -I FORWARD -i docker0 -o docker0 -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -I FORWARD -i docker0 ! -o docker0 -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -I FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -n -L DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -N DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
    DEBU[0105] /usr/sbin/iptables, [--wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -N DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]
    DEBU[0105] /usr/sbin/iptables, [--wait -I FORWARD -o docker0 -j DOCKER]
    INFO[0105] Daemon has completed initialization
    INFO[0105] Docker daemon commit=bb472f0/1.8.2 execdriver=native-0.2 graphdriver=devicemapper version=1.8.2
    ^CINFO[0186] Processing signal 'interrupt'
    DEBU[0187] starting clean shutdown of all containers...
    DEBU[0187] [deviceset docker-202:1-2059595] Shutdown()
    DEBU[0187] [devmapper] Shutting down DeviceSet: /var/lib/docker/devicemapper
    DEBU[0187] [devmapper] deactivateDevice()
    DEBU[0187] [devmapper] deactivateDevice END()
    DEBU[0187] [devmapper] deactivatePool()
    DEBU[0187] [devmapper] deactivatePool END
    DEBU[0187] [deviceset docker-202:1-2059595] Shutdown() END
    DEBU[0187] Clean shutdown succeded

  18. bitsofinfo commented on Nov 13, 2015

    @bitsofinfo

    Same issue, on Azure, Centos 7.1. Following this guide: https://docs.docker.com/engine/installation/centos/

    [root@dog-vm-docker-swarm-node3 dogswarm]# systemctl -l status docker.service
    docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
       Active: failed (Result: timeout) since Fri 2015-11-13 20:06:34 UTC; 1min 28s ago
         Docs: https://docs.docker.com
     Main PID: 10973
    
    Nov 13 20:04:52 dog-vm-docker-swarm-node3 docker[10973]: time="2015-11-13T20:04:52.662126893Z" level=info msg="API listen on /var/run/docker.sock"
    Nov 13 20:04:53 dog-vm-docker-swarm-node3 docker[10973]: time="2015-11-13T20:04:53.423684537Z" level=warning msg="Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
    Nov 13 20:06:22 dog-vm-docker-swarm-node3 systemd[1]: docker.service operation timed out. Terminating.
    Nov 13 20:06:34 dog-vm-docker-swarm-node3 systemd[1]: Failed to start Docker Application Container Engine.
    Nov 13 20:06:34 dog-vm-docker-swarm-node3 systemd[1]: Unit docker.service entered failed state.
    
  19. sparques commented on Nov 19, 2015

    @sparques

    I'm hitting this issue as well (centos 7.1, docker 1.8.2). In my case, it would seem the docker service is failing to start because its dependency docker-storage-setup is failing to start.

    Nov 19 12:29:09 faze.vay8.net systemd[1]: Starting Docker Storage Setup...
    Nov 19 12:29:10 faze.vay8.net docker-storage-setup[1356]: Rounding up size to full physical     extent 12.00 MiB
    Nov 19 12:29:10 faze.vay8.net docker-storage-setup[1356]: Volume group "centos" has insufficient free space (0 extents): 3 required.
    Nov 19 12:29:10 faze.vay8.net systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=5/NOTINSSTALLED
    Nov 19 12:29:10 faze.vay8.net systemd[1]: Failed to start Docker Storage Setup.
    Nov 19 12:29:10 faze.vay8.net systemd[1]: Unit docker-storage-setup.service entered failed state.
    
  20. thaJeztah commented on Nov 20, 2015

    @thaJeztah
    Member

    @deusnefum I don't think that's related to this issue, also, I think that package is used in the RedHat packaged version of Docker? if you're using the version that's packaged by RedHat/CentOS/Fedora, please report the issue in their issue tracker

  21. simoncpu commented on Nov 24, 2015

    @simoncpu

    Just an FYI, installing docker-selinux prevents a straightforward update:

    --> Processing Conflict: docker-engine-selinux-1.9.1-1.el7.centos.noarch conflicts docker-selinux
    --> Finished Dependency Resolution
    Error: docker-engine-selinux conflicts with docker-selinux-1.8.2-7.el7.centos.x86_64
    

    Update proceeds once docker-selinux is removed.

  22. EslamElHusseiny commented on Nov 24, 2015

    @EslamElHusseiny

    @simoncpu, seems like you are switching from docker packages to docker-engine packages, so you need to uninstall docker* and then install docker-engine which includes docker-engine-selinux as well.

  23. trinitronx commented on Jan 26, 2016

    @trinitronx

    On a fresh CentOS 7.1.1503 image (from Amazon AMI ami-61bbf104), I am able to reproduce this by installing docker-1.8.2-10.el7.centos.x86_64 and docker-selinux-1.8.2-10.el7.centos.x86_64 from the CentOS-7 - Extras repo. I ran setenforce 0 to set SELinux to Permissive mode before installing docker.

    Behavior is interesting in that the error only happens on a fresh install when started with SystemD. After I started it manually with debug logging & -D, it worked! The stock /usr/lib/systemd/system/docker.service (plus adding DOCKER_STORAGE_OPTIONS="--storage-opt dm.no_warn_on_loop_devices=true" to /etc/sysconfig/docker-storage) ends up starting docker with command line: /usr/bin/docker daemon --storage-opt dm.no_warn_on_loop_devices=true.

    The first time, docker needs to set up the devicemapper storage using loopback device. However, it appears to be too slow to complete this, and it hangs with message DEBU[0000] activateDeviceIfNeeded(). SystemD then assumes it did not start, waits for a holdoff period, and tries to re-start docker daemon.

    After starting manually with sudo /usr/bin/docker daemon -D -l debug --storage-opt dm.no_warn_on_loop_devices=true, I observe the hang at activateDeviceIfNeeded(), plus some more warnings encountered by the original poster. Eventually, the service starts, and I can run sudo docker version and sudo docker ps in another terminal and see that they are working and outputting the docker API GET requests in the terminal where I started docker daemon manually.

    I can then stop docker in my terminal and re-start it via SystemD with: sudo systemctl start docker. After this point, it works because it does not run into the service re-start issue caused by storage backend initialization.

    The logs for when I manually start docker daemon are below:

    $ sudo /usr/bin/docker daemon -D -l debug  --storage-opt dm.no_warn_on_loop_devices=true
    DEBU[0000] Registering DELETE, /containers/{name:.*}
    DEBU[0000] Registering DELETE, /images/{name:.*}
    DEBU[0000] Registering OPTIONS,
    DEBU[0000] Registering HEAD, /containers/{name:.*}/archive
    DEBU[0000] Registering GET, /images/{name:.*}/get
    DEBU[0000] Registering GET, /images/{name:.*}/json
    DEBU[0000] Registering GET, /containers/{name:.*}/changes
    DEBU[0000] Registering GET, /containers/{name:.*}/logs
    DEBU[0000] Registering GET, /version
    DEBU[0000] Registering GET, /images/search
    DEBU[0000] Registering GET, /images/{name:.*}/tags
    DEBU[0000] Registering GET, /containers/json
    DEBU[0000] Registering GET, /containers/{name:.*}/export
    DEBU[0000] Registering GET, /containers/{name:.*}/stats
    DEBU[0000] Registering GET, /exec/{id:.*}/json
    DEBU[0000] Registering GET, /images/json
    DEBU[0000] Registering GET, /images/{name:.*}/history
    DEBU[0000] Registering GET, /containers/{name:.*}/json
    DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws
    DEBU[0000] Registering GET, /_ping
    DEBU[0000] Registering GET, /events
    DEBU[0000] Registering GET, /info
    DEBU[0000] Registering GET, /images/get
    DEBU[0000] Registering GET, /containers/ps
    DEBU[0000] Registering GET, /containers/{name:.*}/top
    DEBU[0000] Registering GET, /containers/{name:.*}/archive
    DEBU[0000] Registering POST, /images/create
    DEBU[0000] Registering POST, /containers/create
    DEBU[0000] Registering POST, /containers/{name:.*}/resize
    DEBU[0000] Registering POST, /containers/{name:.*}/copy
    DEBU[0000] Registering POST, /containers/{name:.*}/exec
    DEBU[0000] Registering POST, /exec/{name:.*}/resize
    DEBU[0000] Registering POST, /commit
    DEBU[0000] Registering POST, /images/load
    DEBU[0000] Registering POST, /images/{name:.*}/tag
    DEBU[0000] Registering POST, /containers/{name:.*}/unpause
    DEBU[0000] Registering POST, /containers/{name:.*}/restart
    DEBU[0000] Registering POST, /containers/{name:.*}/wait
    DEBU[0000] Registering POST, /containers/{name:.*}/attach
    DEBU[0000] Registering POST, /build
    DEBU[0000] Registering POST, /images/{name:.*}/push
    DEBU[0000] Registering POST, /containers/{name:.*}/kill
    DEBU[0000] Registering POST, /containers/{name:.*}/pause
    DEBU[0000] Registering POST, /containers/{name:.*}/start
    DEBU[0000] Registering POST, /exec/{name:.*}/start
    DEBU[0000] Registering POST, /auth
    DEBU[0000] Registering POST, /containers/{name:.*}/stop
    DEBU[0000] Registering POST, /containers/{name:.*}/rename
    DEBU[0000] Registering PUT, /containers/{name:.*}/archive
    DEBU[0000] devicemapper: driver version is 4.29.0
    DEBU[0000] Generated prefix: docker-202:1-467865
    DEBU[0000] Checking for existence of the pool 'docker-202:1-467865-pool'
    DEBU[0000] [devmapper]: poolDataMajMin=7:0 poolMetaMajMin=7:1
    
    DEBU[0000] [devmapper]: Major:Minor for device: /dev/loop0 is:7:0
    DEBU[0000] [devmapper]: Major:Minor for device: /dev/loop1 is:7:1
    ERRO[0000] WARNING: No --storage-opt dm.thinpooldev specified, using loopback; this configuration is strongly discouraged for production use
    DEBU[0000] [devmapper]: poolDataMajMin=7:0 poolMetaMajMin=7:1
    
    DEBU[0000] docker group found. gid: 496
    INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
    DEBU[0000] [deviceset] constructDeviceIdMap()
    DEBU[0000] Loading data for file /usr/local/lib/docker/devicemapper/metadata/base
    DEBU[0000] Added deviceId=1 to DeviceIdMap
    DEBU[0000] Loading data for file /usr/local/lib/docker/devicemapper/metadata/transaction-metadata
    DEBU[0000] Added deviceId=1 to DeviceIdMap
    DEBU[0000] [deviceset] constructDeviceIdMap() END
    DEBU[0000] Removing uninitialized base image
    DEBU[0000] activateDeviceIfNeeded()
    DEBU[0003] [devmapper] removeDevice START(docker-202:1-467865-base)
    DEBU[0003] [devmapper] removeDevice END(docker-202:1-467865-base)
    DEBU[0003] unregisterDevice(1, )
    DEBU[0003] Initializing base device-mapper thin volume
    DEBU[0003] [devmapper] CreateDevice(poolName=/dev/mapper/docker-202:1-467865-pool, deviceId=1)
    DEBU[0003] Registering device (id 1) with FS size 107374182400
    DEBU[0003] registerDevice(1, )
    DEBU[0003] Creating filesystem on base device-mapper thin volume
    DEBU[0003] activateDeviceIfNeeded()
    DEBU[0073] activateDeviceIfNeeded()
    DEBU[0073] UUID for device: /dev/mapper/docker-202:1-467865-base is:06f7bd1b-1b56-468e-aa25-8dba1ba7e085
    DEBU[0073] [devmapper] deactivateDevice()
    DEBU[0073] [devmapper] removeDevice START(docker-202:1-467865-base)
    DEBU[0073] [devmapper] removeDevice END(docker-202:1-467865-base)
    DEBU[0073] [devmapper] deactivateDevice END()
    INFO[0073] [graphdriver] using prior storage driver "devicemapper"
    DEBU[0073] Using graph driver devicemapper
    DEBU[0073] Using default logging driver json-file
    DEBU[0073] Creating images graph
    DEBU[0073] Restored 0 elements
    DEBU[0073] Creating repository list
    INFO[0073] Option DefaultDriver: bridge
    INFO[0073] Option DefaultNetwork: bridge
    WARN[0073] Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found.
    insmod /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/net/llc/llc.ko
    insmod /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/net/802/stp.ko
    insmod /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/net/bridge/bridge.ko
    insmod /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/net/netfilter/nf_conntrack.ko
    insmod /lib/modules/3.10.0-229.14.1.el7.x86_64/kernel/net/netfilter/nf_nat.ko
    , error: exit status 1
    INFO[0073] Firewalld running: false
    DEBU[0073] /usr/sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -D PREROUTING]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -D OUTPUT]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -F DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -X DOCKER]
    DEBU[0074] Failed to Initialize Datastore due to datastore initialization requires a valid configuration. Operating in non-clustered mode
    DEBU[0074] Setting bridge mac address to 02:42:96:23:62:13
    DEBU[0074] Creating bridge interface "docker0" with network 172.17.42.1/16
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -I POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE]
    DEBU[0074] /usr/sbin/iptables, [--wait -D FORWARD -i docker0 -o docker0 -j DROP]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 -o docker0 -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -I FORWARD -i docker0 -o docker0 -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -C FORWARD -i docker0 ! -o docker0 -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -I FORWARD -i docker0 ! -o docker0 -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -I FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -n -L DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -N DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -C PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -C OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
    DEBU[0074] /usr/sbin/iptables, [--wait -t nat -A OUTPUT -m addrtype --dst-type LOCAL -j DOCKER ! --dst 127.0.0.0/8]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -N DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -t filter -C FORWARD -o docker0 -j DOCKER]
    DEBU[0074] /usr/sbin/iptables, [--wait -I FORWARD -o docker0 -j DOCKER]
    INFO[0074] Daemon has completed initialization
    INFO[0074] Docker daemon                                 commit=a01dc02/1.8.2 execdriver=native-0.2 graphdriver=devicemapper version=1.8.2-el7.centos
    DEBU[0074] Calling GET /version
    INFO[0074] GET /v1.20/version
    DEBU[0280] Calling GET /containers/json
    INFO[0280] GET /v1.20/containers/json
    DEBU[0284] Calling GET /version
    INFO[0284] GET /v1.20/version
    

    So, on CentOS 7 and RHEL 7... this issue seems to be related to the storage backend initialization taking too long for SystemD to think the service is up.

  24. danielwhatmuff commented on Mar 8, 2016

    @danielwhatmuff

    I have the same issue as @trinitronx

  25. danielwhatmuff commented on Mar 8, 2016

    @danielwhatmuff

    Fresh install of Docker hangs when I attempt to start with systemctl start docker, however it works when started as docker daemon. I have the docker-selinux package installed.

    docker -v

    Docker version 1.8.2-el7, build a01dc02/1.8.2

    uname -a

    Linux ip-172-29-0-100.blah.local 3.10.0-327.4.4.el7.x86_64 #1 SMP Thu Dec 17 15:51:24 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

  26. thaJeztah commented on Mar 8, 2016

    @thaJeztah
    Member

    @trinitronx @danielwhatmuff the default size for devicemapper has been changed back to 10G in docker 1.10 (see #18314). Also note that the CentOS Extras packages are maintained and supported by Red Hat, so any issue with those packages should be reported in their issue tracker, because unfortunately we can't make changes in those packages

  27. rhatdan commented on Mar 9, 2016

    @rhatdan
    Contributor

    @danielwhatmuff Please open a bugzilla on this issue.

  28. naftulikay commented on Aug 12, 2016

    @naftulikay

    This bug is present again in 3.10.0-327.28.2.el7.x86_64 with Docker 1.12.0, build 8eab29e, package version:

    Name        : docker-engine
    Arch        : x86_64
    Version     : 1.12.0
    Release     : 1.el7.centos
    
    $ find /etc/systemd /usr/lib/systemd/ -iname '*.socket' | grep docker
    

    Nothing is found, there is no socket unit, I can fix it by scping over the docker.socket file from another host. Evidently it hasn't shipped with Docker 1.12:

    [naftuli@jabronie ~]$ yum provides /usr/lib/systemd/system/docker.service | tail
    docker-engine-1.12.0-1.el7.centos.x86_64 : The open-source application container
                                             : engine
    Repo        : @docker
    Matched from:
    Filename    : /usr/lib/systemd/system/docker.service
    
    [naftuli@jabronie ~]$ yum provides /usr/lib/systemd/system/docker.socket | tail
    docker-engine-1.11.2-1.el7.centos.x86_64 : The open-source application container
                                             : engine
    Repo        : docker-main-repo
    Matched from:
    Filename    : /usr/lib/systemd/system/docker.socket
    

    Docker will not start:

    Aug 12 22:41:24 jabronie systemd[1]: Starting Docker Application Container Engine...
    Aug 12 22:41:24 jabronie docker[1191]: time="2016-08-12T22:41:24.669596177Z" level=fatal msg="no sockets found via socket activation: make sure the service was started by systemd"
    Aug 12 22:41:24 jabronie systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    Aug 12 22:41:24 jabronie systemd[1]: Failed to start Docker Application Container Engine.
    Aug 12 22:41:24 jabronie systemd[1]: Unit docker.service entered failed state.
    Aug 12 22:41:24 jabronie systemd[1]: docker.service failed.
    

    The package is broken by commit 04104c3.

  29. thaJeztah commented on Aug 12, 2016

    @thaJeztah
    Member

    @rfkrocktk it's not broken, socket activation has been removed for RPM based installs; if your install has an unmodified unit file, docker should work, but if local modifications are found, yum/dnf won't replace that file; see the steps to resolve this here; https://github.com/docker/docker/blob/master/CHANGELOG.md#1120-2016-07-14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions