Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker not working with ubuntu 16.04 kernel v4.6.3. #23968

Closed
sauravskumar opened this issue Jun 26, 2016 · 18 comments
Closed

Docker not working with ubuntu 16.04 kernel v4.6.3. #23968

sauravskumar opened this issue Jun 26, 2016 · 18 comments

Comments

@sauravskumar
Copy link

sauravskumar commented Jun 26, 2016

Ubuntu 16.04 has some power management issues... so i had to upgrade the kernel to linux-image-4.6.3-040603-generic_4.6.3-040603.201606241434_amd64.deb . But since the upgrade docker is not running.

I tried removing docker completely and reinstalling it but 2 issues arise

  1. aufs package is not being found for the current kernel version (but it is optional so fine)
  2. when installing docker... it is stuck at setting up docker-engine forever.

I would like to confirm that docker was working perfectly fine on my machine with the default ubuntu 16.04 kernel version before the switch to newer kernel versions.

Can someone please help me to get things working. Thank You in advance.

@thaJeztah
Copy link
Member

Do the system logs show anything useful? Not related, but there's another issue about docker not running properly on a 4.6 kernel #23471

@sauravskumar
Copy link
Author

sauravskumar commented Jun 28, 2016

Logs show nothing... as the terminal is hung up as soon as we try docker-engine install...
$ sudo apt-get install docker-engine
Can you please help?

@thaJeztah
Copy link
Member

Sorry, I don't have easy access to a machine I can put a 4.6 kernel on

@watchwithmike
Copy link

I'm running into the same issue here on a brand new installation. Here are what I believe to be the salient points.

  1. I ran a clean install of Ubuntu 16.04 Desktop on a Dell XPS 13 9350
  2. Under the guidance of Dell I installed Kernel 4.6.0 using these instructions.
  3. Once installed my uname -r returns 4.6.0-040600-generic for which there seems to be no linux-image-extra package for.

My assumption is that we might be able to get this to work if we could find an appropriate linux-image-extra package for our kernel but I don't know where one would go about finding or building such a thing.

Command and log output follows. If there's anything more I can add please let me know.

Failed linux-image-extra install

$ sudo apt-get install linux-image-extra-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-extra-4.6.0-040600-generic
E: Couldn't find any package by glob 'linux-image-extra-4.6.0-040600-generic'
E: Couldn't find any package by regex 'linux-image-extra-4.6.0-040600-generic'

The hung dpkg processes look like:

root      3902  1204  0 17:12 ?        00:00:00 /usr/bin/dpkg --status-fd 46 --configure aufs-tools:amd64 cgroupfs-mount:all docker-engine:amd64
root      3962  3902  0 17:12 ?        00:00:00 /bin/sh /var/lib/dpkg/info/docker-engine.postinst configure

/var/log/apt/term.log

Log started: 2016-07-07  17:12:28
Selecting previously unselected package aufs-tools.
(Reading database ... 
(Reading database ... 5%
...
(Reading database ... 100%
(Reading database ... 250944 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
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 aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up docker-engine (1.11.2-0~xenial) ...

/var/log/apt/history.log

Start-Date: 2016-07-07  17:12:28
Commandline: apt-get install docker-engine
Requested-By: ww (1001)
Install: aufs-tools:amd64 (1:3.2+20130722-1.1ubuntu1, automatic), cgroupfs-mount:amd64 (1.2, automatic), docker-engine:amd64 (1.11.2-0~xenial)

/var/log/dpkg.log

2016-07-07 17:12:28 startup archives unpack
2016-07-07 17:12:28 install aufs-tools:amd64 <none> 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:28 status triggers-pending libc-bin:amd64 2.23-0ubuntu3
2016-07-07 17:12:28 status half-installed aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:28 status triggers-pending man-db:amd64 2.7.5-1
2016-07-07 17:12:28 status unpacked aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:28 status unpacked aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:28 install cgroupfs-mount:all <none> 1.2
2016-07-07 17:12:28 status half-installed cgroupfs-mount:all 1.2
2016-07-07 17:12:28 status triggers-pending ureadahead:amd64 0.100.0-19
2016-07-07 17:12:28 status triggers-pending systemd:amd64 229-4ubuntu6
2016-07-07 17:12:28 status triggers-pending ureadahead:amd64 0.100.0-19
2016-07-07 17:12:28 status unpacked cgroupfs-mount:all 1.2
2016-07-07 17:12:28 status unpacked cgroupfs-mount:all 1.2
2016-07-07 17:12:29 install docker-engine:amd64 <none> 1.11.2-0~xenial
2016-07-07 17:12:29 status half-installed docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:30 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:30 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:30 trigproc libc-bin:amd64 2.23-0ubuntu3 <none>
2016-07-07 17:12:30 status half-configured libc-bin:amd64 2.23-0ubuntu3
2016-07-07 17:12:30 status installed libc-bin:amd64 2.23-0ubuntu3
2016-07-07 17:12:30 trigproc man-db:amd64 2.7.5-1 <none>
2016-07-07 17:12:30 status half-configured man-db:amd64 2.7.5-1
2016-07-07 17:12:31 status installed man-db:amd64 2.7.5-1
2016-07-07 17:12:31 trigproc ureadahead:amd64 0.100.0-19 <none>
2016-07-07 17:12:31 status half-configured ureadahead:amd64 0.100.0-19
2016-07-07 17:12:31 status installed ureadahead:amd64 0.100.0-19
2016-07-07 17:12:31 trigproc systemd:amd64 229-4ubuntu6 <none>
2016-07-07 17:12:31 status half-configured systemd:amd64 229-4ubuntu6
2016-07-07 17:12:31 status installed systemd:amd64 229-4ubuntu6
2016-07-07 17:12:31 startup packages configure
2016-07-07 17:12:31 configure aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1 <none>
2016-07-07 17:12:31 status triggers-pending libc-bin:amd64 2.23-0ubuntu3
2016-07-07 17:12:31 status unpacked aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:31 status unpacked aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:31 status half-configured aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:31 status installed aufs-tools:amd64 1:3.2+20130722-1.1ubuntu1
2016-07-07 17:12:31 configure cgroupfs-mount:all 1.2 <none>
2016-07-07 17:12:31 status unpacked cgroupfs-mount:all 1.2
2016-07-07 17:12:31 status triggers-pending systemd:amd64 229-4ubuntu6
2016-07-07 17:12:31 status triggers-pending ureadahead:amd64 0.100.0-19
2016-07-07 17:12:31 status unpacked cgroupfs-mount:all 1.2
2016-07-07 17:12:31 status triggers-pending ureadahead:amd64 0.100.0-19
2016-07-07 17:12:31 status unpacked cgroupfs-mount:all 1.2
2016-07-07 17:12:31 status half-configured cgroupfs-mount:all 1.2
2016-07-07 17:12:31 status installed cgroupfs-mount:all 1.2
2016-07-07 17:12:31 configure docker-engine:amd64 1.11.2-0~xenial <none>
2016-07-07 17:12:31 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:31 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:31 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:31 status unpacked docker-engine:amd64 1.11.2-0~xenial
2016-07-07 17:12:31 status half-configured docker-engine:amd64 1.11.2-0~xenial

@thaJeztah
Copy link
Member

Alright, so looks like there's no package for that, so you won't be able to use aufs; can you start docker-engine using the overlay driver? --storage-driver=overlay on the daemon, or using an /etc/docker/daemon.json configuration file? https://docs.docker.com/engine/reference/commandline/dockerd/#/daemon-configuration-file

@watchwithmike
Copy link

watchwithmike commented Jul 8, 2016

Sweet, that worked. I was dubious at first because it seemed like docker didn't actually install since dpkg hung but the docker service was installed but failing to start like this:

ww@deepthought:~$ sudo service docker status
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (start) since Thu 2016-07-07 17:12:32 PDT; 47min ago
     Docs: https://docs.docker.com
 Main PID: 4052 (docker)
    Tasks: 22
   Memory: 9.5M
      CPU: 577ms
   CGroup: /system.slice/docker.service
           ├─4052 /usr/bin/docker daemon -H fd://
           └─4072 docker-containerd -l /var/run/docker/libcontainerd/docker-containerd.sock --runtime docker-runc --start-timeout 2m

Jul 07 17:12:32 deepthought systemd[1]: Starting Docker Application Container Engine...
Jul 07 17:12:32 deepthought docker[4052]: time="2016-07-07T17:12:32.395040236-07:00" level=info msg="New containerd process, pid: 4072\n"

After installing this /etc/docker/daemon.json

{
    "storage-driver": "overlay"
}

The output looked like:

sudo service docker status
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-07-07 18:06:18 PDT; 4s ago
     Docs: https://docs.docker.com
 Main PID: 7705 (docker)
    Tasks: 18
   Memory: 18.0M
      CPU: 331ms
   CGroup: /system.slice/docker.service
           ├─7705 /usr/bin/docker daemon -H fd://
           └─7717 docker-containerd -l /var/run/docker/libcontainerd/docker-containerd.sock --runtime docker-runc --start-timeout 2m

Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.365383994-07:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.415399098-07:00" level=info msg="Firewalld running: false"
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.490055111-07:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bi
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.601088129-07:00" level=warning msg="Your kernel does not support swap memory limit."
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.601684343-07:00" level=info msg="Loading containers: start."
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.601749511-07:00" level=info msg="Loading containers: done."
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.601762263-07:00" level=info msg="Daemon has completed initialization"
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.601778415-07:00" level=info msg="Docker daemon" commit=b9f10c9 graphdriver=overlay version=1.11.2
Jul 07 18:06:18 deepthought docker[7705]: time="2016-07-07T18:06:18.618322723-07:00" level=info msg="API listen on /var/run/docker.sock"
Jul 07 18:06:18 deepthought systemd[1]: Started Docker Application Container Engine.

I also confirmed that I could run docker run hello-world

Thanks for the quick response!!!

@sauravskumar
Copy link
Author

Worked for me too... Thank You @thaJeztah @watchwithmike

@thaJeztah
Copy link
Member

Good to hear, happy that we were able to find what's causing this. The "linux-image-extra" bit was the missing information :-)

I'm closing this issue for now, because the original issue was resolved, and kernel 4.6 is not a default install for Ubuntu, so for now I don't think there's anything left to be done. Feel free to continue the discussion though 👍

@watchwithmike
Copy link

@thaJeztah I agree this issue is worth closing but I'm wondering if another should be opened to address the fact that the /bin/sh /var/lib/dpkg/info/docker-engine.postinst configure script (and therefore dpkg itself) hangs on install when the linux-image-extra package is not present. Maybe a feature request for checking the presence of the library and if not present, starting the daemon with the overlay flag or inserting the daemon.json file on the file system?

I'm happy to open one if it's not going to just be noise.

@thaJeztah
Copy link
Member

@watchwithmike agreed, we should look into that (although it's not an officially supported setup (non-standard kernel)). Feel free to open an issue

@diogomoreira
Copy link

Did the same as @watchwithmike, the output from sudo service docker status is the following:

docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Ter 2016-07-19 11:16:43 BRT; 6min ago
     Docs: https://docs.docker.com
 Main PID: 1084 (docker)
    Tasks: 20
   Memory: 54.2M
      CPU: 455ms
   CGroup: /system.slice/docker.service
           ├─1084 /usr/bin/docker daemon -H fd://
           └─1418 docker-containerd -l /var/run/docker/libcontainerd/docker-containerd.sock --runtime docker-runc --start-timeout 2m

Jul 19 11:16:42 leonhart docker[1084]: time="2016-07-19T11:16:42.694108854-03:00" level=info msg="Firewalld running: false"
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.034271628-03:00" level=info msg="Default bridge (docker0) is assigned with an 
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.168869389-03:00" level=warning msg="Your kernel does not support swap memory l
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.185752409-03:00" level=info msg="Loading containers: start."
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.201678523-03:00" level=info msg="Loading containers: done."
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.201711395-03:00" level=info msg="Daemon has completed initialization"
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.201748278-03:00" level=info msg="Docker daemon" commit=b9f10c9 graphdriver=ove
Jul 19 11:16:43 leonhart docker[1084]: time="2016-07-19T11:16:43.223717235-03:00" level=info msg="API listen on /var/run/docker.sock"
Jul 19 11:16:43 leonhart systemd[1]: Started Docker Application Container Engine.
Jul 19 11:17:34 leonhart systemd[1]: Started Docker Application Container Engine.

But I can't run docker run hello-world. I get docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.. Have you been through this problem?

@thaJeztah
Copy link
Member

@diogomoreira does it work with sudo? sudo docker run hello-world?

@diogomoreira
Copy link

@thaJeztah it works! But it should work without sudo?

@thaJeztah
Copy link
Member

@diogomoreira it doesn't work without sudo, because the default configuration is to connect with docker through a socket (/var/run/docker.sock), and the permissions of that socket don't allow access.

You can fix this by adding yourself to the docker group, and logging out/in, see https://docs.docker.com/engine/installation/linux/ubuntulinux/#/create-a-docker-group

@diogomoreira
Copy link

@thaJeztah it worked! Thank you very much! :)

@farhatmo
Copy link

@thaJeztah it's working for me also : --storage-driver=overlay . Thanks so much 👍

@f3l1x
Copy link

f3l1x commented Nov 29, 2016

This helps me -> #14026 (comment)

@csaladenes
Copy link

Fixing the Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. problem, for me this worked:

  • create daemon.json in /etc/docker/

  • put this in it:

    {
    "exec-root": "/path/to/docker/run",
    "storage-driver": "overlay",
    "graph": "/path/to/docker/lib"
    }

  • then try: docker daemon

  • reboot

  • docker run hello-world should succeed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants