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:

  1. 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

Most upvoted comments

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:

  • In a new Linode, update and upgrade packages:
apt-get update
apt-get upgrade -y
  • Install and setup dmsetup:
apt-get install -y dmsetup
dmsetup mknodes

For example, as of now:

apt-get install apt-transport-https ca-certificates

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list

apt-get update
apt-get install -y docker-engine
service docker start

@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:

  1. apt-get install dmsetup
  2. dmsetup mknodes
  3. 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 hung

Trying to run sudo dmsetup mknodes as suggested by @ilyakitaev resulted in the same sudo: dmsetup: command not found as seen by @kinsomicrote of course sudo apt-get install dmsetup -y fails at this point due to the hung docker-engine install. Running sudo dpkg --configure -a seemed to complete the docker-engine (1.11.2-0-xenial) setup, but I still get a hang on docker info (even after successfully installing dmsetup and doing sudo dmsetup mknodes).

After all that… sudo apt-get install -y --reinstall docker-engine seems to have sorted things out. At least docker info works:

Containers: 4
 Running: 0
 Paused: 0
 Stopped: 4
Images: 2
Server Version: 1.11.2
Storage Driver: devicemapper
 Pool Name: docker-8:1-526250-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: ext4
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 460.6 MB
 Data Space Total: 107.4 GB
 Data Space Available: 18.36 GB
 Metadata Space Used: 1.106 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.146 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge
Kernel Version: 4.4.0-7-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 975.1 MiB
Name: xenial
ID: ICIC:6PYH:JZDP:AGKC:I7AO:BECQ:6F7L:645L:4VQ6:YPAX:4WOA:WZON
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support

But docker run hello-world fails:

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
a9d36faac0fe: Pull complete
Digest: sha256:e52be8ffeeb1f374f440893189cd32f44cb166650e7ab185fa7735b7dc48d619
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: Container command '/hello' not found or does not exist..

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:

$docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
a9d36faac0fe: Pull complete
Digest: sha256:e52be8ffeeb1f374f440893189cd32f44cb166650e7ab185fa7735b7dc48d619
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.

<snipped>

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:

  1. Remove any docker.service or docker configuration files from /etc/systemd/system/ (e.g. /etc/systemd/system/docker.service.d/docker.conf)
  2. sudo reboot
  3. sudo dpkg --configure -a
  4. (Optional: docker should be up and running without this step)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:

{
    "storage-driver": "overlay"
}

After restarting my computer, I ran sudo dpkg --configure -a. sudo docker run hello-world works and sudo 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.

  • Add to package dependencies list “linux-image-extra-$(uname -r)” (this package add aufs support) AND/OR “dmsetup” for Ubuntu Xenial package.
  • Patch docker source similar way native canonical package:
Description: move "overlay" to a higher priority (now that AUFS is not supported in Debian kernels)
Author: Tianon Gravi <tianon@debian.org>
Forwarded: no

diff --git a/daemon/graphdriver/driver_linux.go b/daemon/graphdriver/driver_linux.go
index 410a62f..eab78e7 100644
--- a/daemon/graphdriver/driver_linux.go
+++ b/daemon/graphdriver/driver_linux.go
@@ -48,8 +48,8 @@ var (
        "aufs",
        "btrfs",
        "zfs",
-       "devicemapper",
        "overlay",
+       "devicemapper",
        "vfs",
    }
  • Redesign setup process to force graphdriver for different clean systems or something like that

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:

Package: docker-engine
Status: install ok half-configured
Priority: optional
Section: admin
Installed-Size: 71704
Maintainer: Docker <support@docker.com>
Architecture: amd64
Version: 1.11.2-0~xenial
Depends: iptables, init-system-helpers (>= 1.18~), lsb-base (>= 4.1+Debian11ubuntu7), libapparmor1 (>= 2.6~devel), libc6 (>= 2.17), libdevmapper1.02.1 (>= 2:1.02.97), libltdl7 (>= 2.4.6), libseccomp2 (>= 2.1.0), libsystemd0
Recommends: aufs-tools, ca-certificates, cgroupfs-mount | cgroup-lite, git, xz-utils, apparmor
Conflicts: docker (<< 1.5~), docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
Conffiles:
 /etc/default/docker df04972d0cf6aefc63ad37c69a26a8bb
 /etc/init.d/docker db8c4e5c7e8911b40b590489eedaa406
 /etc/init/docker.conf 18fbf10637ba7cd21cf38fd993b21ea4

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!