moby: Ubuntu 16.04 install for 1.11.2 hangs
BUG REPORT INFORMATION
Additional environment details (AWS, VirtualBox, physical, etc.):
Ubuntu 16.04 Linux Kernel 4.6.0-040600 (had to upgrade to fix a Wifi issue) Docker 1.11.2
Steps to reproduce the issue:
- Try to install docker according to Ubuntu install instructions
Describe the results you received: Install hangs at
The following NEW packages will be installed:
docker-engine
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/14.5 MB of archives.
After this operation, 73.4 MB of additional disk space will be used.
Selecting previously unselected package docker-engine.
(Reading database ... 226108 files and directories currently installed.)
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up docker-engine (1.11.2-0~xenial) ...
Progress: [ 66%] [#######################################...................]
Additional information you deem important (e.g. issue happens only occasionally): /var/log/apt/term.log
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up docker-engine (1.11.2-0~xenial) ...
/var/log/dpkg.log
2016-06-07 11:33:02 startup packages configure
2016-06-07 11:35:42 startup archives unpack
2016-06-07 11:35:42 install docker-engine:amd64 <none> 1.11.2-0~xenial
2016-06-07 11:35:42 status half-installed docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:44 status triggers-pending man-db:amd64 2.7.5-1
2016-06-07 11:35:44 status triggers-pending ureadahead:amd64 0.100.0-19
2016-06-07 11:35:44 status triggers-pending systemd:amd64 229-4ubuntu6
2016-06-07 11:35:44 status triggers-pending ureadahead:amd64 0.100.0-19
2016-06-07 11:35:44 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:44 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:44 trigproc man-db:amd64 2.7.5-1 <none>
2016-06-07 11:35:44 status half-configured man-db:amd64 2.7.5-1
2016-06-07 11:35:45 status installed man-db:amd64 2.7.5-1
2016-06-07 11:35:45 trigproc ureadahead:amd64 0.100.0-19 <none>
2016-06-07 11:35:45 status half-configured ureadahead:amd64 0.100.0-19
2016-06-07 11:35:45 status installed ureadahead:amd64 0.100.0-19
2016-06-07 11:35:45 trigproc systemd:amd64 229-4ubuntu6 <none>
2016-06-07 11:35:45 status half-configured systemd:amd64 229-4ubuntu6
2016-06-07 11:35:45 status installed systemd:amd64 229-4ubuntu6
2016-06-07 11:35:45 startup packages configure
2016-06-07 11:35:45 configure docker-engine:amd64 1.11.2-0~xenial <none>
2016-06-07 11:35:45 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:45 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:45 status triggers-pending systemd:amd64 229-4ubuntu6
2016-06-07 11:35:45 status triggers-pending ureadahead:amd64 0.100.0-19
2016-06-07 11:35:45 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:45 status triggers-pending ureadahead:amd64 0.100.0-19
2016-06-07 11:35:45 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-06-07 11:35:45 status half-configured docker-engine:amd64 1.11.2-0~xenial
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 18
- Comments: 34 (5 by maintainers)
Commits related to this issue
- Ubuntu 16.04 requires dmsetup to be installed before docker. Otherwise dpkg cannot install docker (installation hangs) See details here: https://github.com/docker/docker/issues/23347 — committed to DG0lden/docker.ubuntu by DG0lden 8 years ago
- Ubuntu 16.04 requires dmsetup to be installed before docker. Otherwise dpkg cannot install docker (installation hangs) See details here: https://github.com/docker/docker/issues/23347 — committed to angstwad/docker.ubuntu by DG0lden 8 years ago
- Ubuntu 16.04 LTS requires `dmsetup` for Docker to install Docker may hang during installation when the `dmsetup` package is not installed on Ubuntu 16.04. For more information, see the Docker bug rep... — committed to jbenden/ansible-role-docker by jbenden 7 years ago
- Bug Fixes Fixed: https://github.com/angstwad/docker.ubuntu/issues/175 Removed workaround for: https://github.com/moby/moby/issues/23347 (no longer required) Cleaned up conditional variables Tested... — committed to Darkknight33/docker.ubuntu by deleted user 7 years ago
- Fix for #175 & other changes (#194) * Bug Fixes Fixed: https://github.com/angstwad/docker.ubuntu/issues/175 Removed workaround for: https://github.com/moby/moby/issues/23347 (no longer required) ... — committed to angstwad/docker.ubuntu by deleted user 7 years ago
Ubuntu 16.04 Kernel 4.5.7-040507-generic bare metal
hangs on configuring
sudo dmsetup mknodes fixed it for me
For those of you running on Linode, @brentjanderson’s instructions worked for me on a Ubuntu 16.04 as root user on a new Linode.
Namely:
For example, as of now:
@lillem4n Your instructions worked like a champ for me on 4.6.0-040600rc7-generic for running a hello world example. Specifically, the following worked before running
apt-get install docker-engine
:Same issue here with Ubuntu 16.04 with stock 4.4.0-7-generic x86_64 kernel on a VMware Workstation VM
I tried running
docker info
in a separate shell, and that also hungTrying to run
sudo dmsetup mknodes
as suggested by @ilyakitaev resulted in the samesudo: dmsetup: command not found
as seen by @kinsomicrote of coursesudo apt-get install dmsetup -y
fails at this point due to the hung docker-engine install. Runningsudo dpkg --configure -a
seemed to complete the docker-engine (1.11.2-0-xenial) setup, but I still get a hang ondocker info
(even after successfully installing dmsetup and doingsudo dmsetup mknodes
).After all that…
sudo apt-get install -y --reinstall docker-engine
seems to have sorted things out. At leastdocker info
works:But
docker run hello-world
fails:I want overlay rather than device mapper anyway so I follow my own guidance to reconfigure the storage driver, and at last things work as expected:
I was getting the errors when trying to install docker-engine on Ubuntu 16.04 Xenial:
my fix was: apt-get install dmsetup dmsetup mknodes #then follow the standard docker install process at docker
I am surprised this issue hasn’t been resolved yet. I can’t speak for others, but I’m still deploying 14.04 host machines - at least they are trusty. 😄
@schors great detective work - though this reveals a miserable lack of testing that a high profile release doesn’t work on the latest version of one of the most popular distros
considering the the Docker team have been advocating overlay over AUFS for over a year it’s a shame that their good advice hasn’t yet made it into the code
If anyone else has this problem, what fixed it for me was:
/etc/systemd/system/
(e.g. /etc/systemd/system/docker.service.d/docker.conf)sudo reboot
sudo dpkg --configure -a
sudo apt-get install --reinstall docker-ce
Edit: Added a reboot step between step 1 and 3. Following the steps as before didn’t really work all the time (i guess i missed the reboot part)
docker 1.13 will prioritize overlay and overlay2 over devicemapper, which should resolve this issue on recent kernels
@tiangolo @lillem4n the dmsetup route worked like a charm. Really not that hard as long as you remember the few extra steps besides what is on docker’s install guide on their website. thanks!
I’m running Linux Kernel 4.6.4-040604-generic and my install also hangs the same way. I was also getting
sudo: dmsetup: command not found
so I followed @thaJeztah and @watchwithmike’s instructions in https://github.com/docker/docker/issues/23968 to run the docker-engine using the overlay engine:Ignoring the hanging installation in the background, I created
/etc/docker/daemon.json
and put:After restarting my computer, I ran
sudo dpkg --configure -a
.sudo docker run hello-world
works andsudo service docker status
shows it is actively running. I guess that means it’s working…Also probably relevant to: https://github.com/docker/docker/issues/24478
This issue also applies to docker version 1.12.0. The problem is that the package missing critical dependencies. But this issue does not appears on the standard Ubuntu editions, because standart editions contains that.
Docker trying to activate graphdrivers with hardcoded priority at startup (file daemon/graphdriver/driver_linux.go - “aufs”, “btrfs”, “zfs”, “overlay”, “devicemapper”, “vfs” ). But AUFS is not supported in standart Ubuntu kernels. Then Docker trying to setup devmapper graphdriver. Devmapper initialization depends on dmsetup utility. The installation hangs with messages above if dmsetup is absent.
There are three ways to solve the issue.
On kernel 4.7.0-rc3 I have the same issue (hangs on Setting up docker-engine (1.11.2-0~xenial) …)
However, it got working again, hello world and all, when doing this: sudo kill apt PID; sudo rm /var/lib/dpkg/lock; sudo dmsetup mknodes; sudo apt-get install -y --reinstall docker-engine;
debug info: lilleman@rex:~$ uname -a Linux rex 4.7.0-040700rc3-generic #201606121131 SMP Sun Jun 12 15:34:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Closing this, because of my previous comment, and we didn’t get new reports of this for a while. If you’re running into this problem, please open a new issue with details
this is an extremely painful one that leaves apt in a very screwed up state
I am running on cloud VM and I get the same issue.
Last dpkg status:
Linux ubuntu 4.5.5-x86_64-linode69 #3 SMP Fri May 20 15:25:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
@ilyakitaev Thanks that fixed it!