moby: Xenial (16.04) - Failed to start Docker Application Container Engine
Even though i read all other issues reported already concerning docker support for xenial it still doesn’t work for me. I cannot successfully install it neither via the suggested method on the official documentation nor with the fast-install via wget
and sudo dpkg
.
Following i report some information i could find:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mit 2016-04-27 18:46:28 CEST; 7min ago
Docs: https://docs.docker.com
Process: 7537 ExecStart=/usr/bin/docker daemon -H fd:// (code=exited, status=1/FAILURE)
Main PID: 7537 (code=exited, status=1/FAILURE)
Apr 27 18:46:27 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:27.366619877+02:00" level=info msg="New containerd process, pid: 7552\n"
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.416215408+02:00" level=error msg="devmapper: Unable to delete device: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-pool"
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.416290179+02:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.423610137+02:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.423644646+02:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-pool"
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28+02:00" level=info msg="stopping containerd after receiving terminated"
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: Failed to start Docker Application Container Engine.
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Unit entered failed state.
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 27 18:46:26 gbeschbacher-xps sudo[7455]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Reloading.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: apt-daily.timer: Adding 8h 56min 38.349166s random time.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Started ACPI event daemon.
-- Subject: Unit acpid.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit acpid.service has finished starting up.
--
-- The start-up result is done.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Started CUPS Scheduler.
-- Subject: Unit cups.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit cups.service has finished starting up.
--
-- The start-up result is done.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Reloading.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: apt-daily.timer: Adding 5h 49min 22.325636s random time.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Started ACPI event daemon.
-- Subject: Unit acpid.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit acpid.service has finished starting up.
--
-- The start-up result is done.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Started CUPS Scheduler.
-- Subject: Unit cups.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit cups.service has finished starting up.
--
-- The start-up result is done.
Apr 27 18:46:27 gbeschbacher-xps systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Apr 27 18:46:27 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:27.366619877+02:00" level=info msg="New containerd process, pid: 7552\n"
Apr 27 18:46:28 gbeschbacher-xps audit[7571]: AVC apparmor="STATUS" operation="profile_replace" name="docker-default" pid=7571 comm="apparmor_parser"
Apr 27 18:46:28 gbeschbacher-xps kernel: audit: type=1400 audit(1461775588.391:28): apparmor="STATUS" operation="profile_replace" name="docker-default" pid=7571 comm="apparmor_parser"
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.416215408+02:00" level=error msg="devmapper: Unable to delete device: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-pool"
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.416290179+02:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.423610137+02:00" level=error msg="[graphdriver] prior storage driver \"devicemapper\" failed: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28.423644646+02:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devicemapper: Can't set task name /dev/mapper/docker-259:2-5395073-pool"
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 18:46:28 gbeschbacher-xps docker[7537]: time="2016-04-27T18:46:28+02:00" level=info msg="stopping containerd after receiving terminated"
Apr 27 18:46:28 gbeschbacher-xps 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.
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Unit entered failed state.
Apr 27 18:46:28 gbeschbacher-xps systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 27 18:46:30 gbeschbacher-xps sudo[7455]: pam_unix(sudo:session): session closed for user root
Apr 27 18:48:19 gbeschbacher-xps pkexec[7655]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Apr 27 18:48:19 gbeschbacher-xps pkexec[7655]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
Apr 27 18:48:19 gbeschbacher-xps pkexec[7655]: gbeschbacher: Executing command [USER=root] [TTY=unknown] [CWD=/home/gbeschbacher] [COMMAND=/usr/lib/update-notifier/package-system-locked]
Apr 27 19:00:10 gbeschbacher-xps upowerd[1114]: (upowerd:1114): UPower-Linux-WARNING **: energy 57,532000 bigger than full 53,405200
Apr 27 19:00:10 gbeschbacher-xps kernel: ACPI Error: Cannot release Mutex [PATM], not acquired (20160108/exmutex-393)
Apr 27 19:00:10 gbeschbacher-xps kernel: ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.ECDV._Q66] (Node ffff8802780e88c0), AE_AML_MUTEX_NOT_ACQUIRED (20160108/psparse-542)
~ ❯❯❯ uname -a
Linux xenial 4.6.0-999-generic #201603262200 SMP Sun Mar 27 02:02:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I appreciate any information on this case and am willing to try out everything possible to get this to work 😃 Thanks in advance, Georg
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (9 by maintainers)
The output indicates that there’s an issue with devicemapper. Some things I notice / wonder;
If you didn’t pick devicemapper for a reason, and don’t have any images/containers from a previous install that you want to keep, I suggest to;
/var/lib/docker
(rm -rf /var/lib/docker
) **this will remove all existing containers and images-s overlay
to the daemon options (see https://docs.docker.com/engine/admin/systemd/#custom-docker-daemon-options)Solution is at the page indicated by @victor-ono
edit /etc/default/docker file and add the option: DOCKER_OPTS=“-s overlay”
then systemctl restart docker.service
Maybe this will help someone too. I’ve got a 4.5.7 kernel and Ubuntu Xenial (16.04)
The Docker installation process hang
Process backtrace
I have noticed the dockerd process was also running at that time:
But
docker info
commands were hanging too.I have tried restarting docker service, which caused the installation to fail with the following output:
Then, each time I have been trying to continue the installation
apt -f install
, I was getting the same error. And each time I was trying to restart docker service manually, the following message was getting into/var/log/syslog
file:So it made me thinking that something gone wrong with he devicemapper. Actually I could not remove the docker devicemapper loop devices using the
losetup -D
:The only thing that helped is
dmsetup
:Then the installation could successfully be finished:
Voila!
I need to mention, that on the moment of Docker installation, I did not have
dmsetup
installed at all. So I think that is the real cause of the problem.Actually, without having
dmsetup
installed, neithercryptsetup luksOpen
was working for me. Since it was hanging onsemop(0, [{0, 0, 0}], 1)
syscall due to missing udev rules/lib/udev/rules.d/55-dm.rules
.I think this was due to missing hooks which dmsetup is bringing with itself:
So maybe it would be making sense to add the dmsetup as a dependency in docker-engine .deb, what do you think, @thaJeztah ?
I managed to make it work by following the link @thaJeztah posted for the config file. As
root
, create a file/etc/docker/daemon.json
with the following content:This works with systemd for me with Ubuntu 16.04 and stock 4.4 kernel.
Edit: updated per thaJeztah comment below
@misham for 4.4 kernels, I’d recommend using the
overlay2
storage driver, which has the same advantages asoverlay
but not the limitations it has (i.e. running out of inodes)@boussou that won’t work for systems using systemd (installed through the official packages); the easiest way, and something that always works, is to use a daemon configuration file. See https://docs.docker.com/engine/reference/commandline/dockerd/#/daemon-configuration-file
@thaJeztah If I just want to install docker-ce with my customized kernel, say, the kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/ . I’m now using the kernel:
But I failed to install docker-ce with the following ERROR message:
http://stackoverflow.com/questions/37227349/unable-to-start-docker-service-in-ubuntu-16-04
You’re welcome, and good to hear it worked out in the end!