Repository navigation
Closed
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
thaJeztah commentedon Aug 11, 2015
ping @jfrazelle
jessfraz commentedon Aug 11, 2015
it looks like the daemon failed to start w something about the bridge ping @mavenugo @mrjana
jessfraz commentedon Aug 11, 2015
did you do an
yum updatebeforejessfraz commentedon Aug 11, 2015
I cant reproduce on a centos 7 machine I want to say it has something to do with kernel config
jessfraz commentedon Aug 11, 2015
can you try running this https://github.com/docker/docker/blob/master/contrib/check-config.sh
mrjana commentedon Aug 12, 2015
@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.
jessfraz commentedon Aug 12, 2015
Those were the logs :/
abierbaum commentedon Aug 12, 2015
@jfrazelle I just ran check config and yum update.
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)
abierbaum commentedon Aug 12, 2015
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.
KalleDK commentedon Aug 12, 2015
Same problem with centos 7 inside VMware Player
Centos 7 minimal install
Logs
abierbaum commentedon Aug 12, 2015
When I run docker daemon directly from the command line I have no issue:
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?
KalleDK commentedon Aug 12, 2015
My guess is firewall rules
KalleDK commentedon Aug 12, 2015
I can have firewalld running and then start the docker service one time now.. but it will fail if i restart it
abierbaum commentedon Aug 12, 2015
I have verified that I can
systemctl start dockeron both a softlayer instance and a digitalocean instance. It will run even if firewalld is also running.When running inside a virtualbox VM though:
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 dockerwith the "-D" option send to the daemon, this is the output from journalctl --unit=docker after a fresh install and start.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?
squeaky-pl commentedon Aug 12, 2015
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:
however if i stop the firewall
I can start Docker daemon without problems
102 remaining items
EslamElHusseiny commentedon Nov 6, 2015
I've tried docker-engine 1.9 on CentOS 7.1 AMI but it didn't work.
/var/log/messages :
rjsm commentedon Nov 12, 2015
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
bitsofinfo commentedon Nov 13, 2015
Same issue, on Azure, Centos 7.1. Following this guide: https://docs.docker.com/engine/installation/centos/
sparques commentedon Nov 19, 2015
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.
thaJeztah commentedon Nov 20, 2015
@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
simoncpu commentedon Nov 24, 2015
Just an FYI, installing docker-selinux prevents a straightforward update:
Update proceeds once docker-selinux is removed.
EslamElHusseiny commentedon Nov 24, 2015
@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.
trinitronx commentedon Jan 26, 2016
On a fresh CentOS 7.1.1503 image (from Amazon AMI
ami-61bbf104), I am able to reproduce this by installingdocker-1.8.2-10.el7.centos.x86_64anddocker-selinux-1.8.2-10.el7.centos.x86_64from theCentOS-7 - Extrasrepo. I ransetenforce 0to set SELinux toPermissivemode 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 addingDOCKER_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-startdocker 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 atactivateDeviceIfNeeded(), plus some more warnings encountered by the original poster. Eventually, the service starts, and I can runsudo docker versionandsudo docker psin another terminal and see that they are working and outputting the docker APIGETrequests in the terminal where I starteddocker daemonmanually.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 daemonare below:So, on
CentOS 7andRHEL 7... this issue seems to be related to the storage backend initialization taking too long for SystemD to think the service is up.danielwhatmuff commentedon Mar 8, 2016
I have the same issue as @trinitronx
danielwhatmuff commentedon Mar 8, 2016
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
thaJeztah commentedon Mar 8, 2016
@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
rhatdan commentedon Mar 9, 2016
@danielwhatmuff Please open a bugzilla on this issue.
naftulikay commentedon Aug 12, 2016
This bug is present again in
3.10.0-327.28.2.el7.x86_64with Docker1.12.0, build 8eab29e, package version:Nothing is found, there is no socket unit, I can fix it by
scping over thedocker.socketfile from another host. Evidently it hasn't shipped with Docker 1.12:Docker will not start:
The package is broken by commit 04104c3.
thaJeztah commentedon Aug 12, 2016
@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