# Problèmes avec Docker et le noyau sur DigitalOcean

**URL:** https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627
**Category:** Self-hosting
**Created:** [Avril 8, 2017, 3:51 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627 "2017-04-08T03:51:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 3:51 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/1 "2017-04-08T03:51:22Z")

</div>

On the forum I use as a test bed, I just did some normal maintenance routines, and now I get this error during a rebuild

```plaintext
Removing old container
+ /usr/bin/docker rm app
Error response from daemon: Driver aufs failed to remove root filesystem b610111d39e8634398cd28b510bf362b09640e9111438503c12d22b3cd046950: rename /var/lib/docker/aufs/mnt/2b8f3dac5f82f25dfbc6a17d9c0fd70aca12cace46fc72be6090eb3554c99886 /var/lib/docker/aufs/mnt/2b8f3dac5f82f25dfbc6a17d9c0fd70aca12cace46fc72be6090eb3554c99886-removing: device or resource busy

starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Container is marked for removal and cannot be started.
Error: failed to start containers: app

```

Prior to this, I ran `apt-get upgrade`, which netted `Docker version 17.04.0-ce, build 4845c56`

This is a digitalocean ubuntu 14.0.4 LTS droplet using the standard docker install.

History tells me there’s a problem with my kernel & image extra versions.

`uname -r` tells me `3.13.0-71-generic`

I also see

```plaintext
:/var/discourse# dpkg --get-selections | grep linux-image
<snip>
linux-image-3.13.0-105-generic deinstall
linux-image-3.13.0-106-generic deinstall
linux-image-3.13.0-107-generic deinstall
linux-image-3.13.0-108-generic deinstall
linux-image-3.13.0-57-generic deinstall
linux-image-3.13.0-61-generic deinstall
linux-image-3.13.0-68-generic deinstall
linux-image-3.13.0-71-generic install
linux-image-3.13.0-74-generic deinstall
linux-image-3.13.0-76-generic deinstall
linux-image-3.13.0-77-generic deinstall
<snip>

```

So, I guess I’m missing the one image that matches my kernel?

I guess my question here is.. how best to avoid issues like this, where I’m dealing kernel mis-matches?

(Unless, of course, there’s some other issue like a known problem in docker, etc)

TIA

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 4:11 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/2 "2017-04-08T04:11:12Z")

</div>

Why not use a 16.04 image? Also you could give the output of `uname -r` – which would be immensely helpful here but I’d recommend just updating to 16.04 unless you have a reason to be on 14.04

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 4:12 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/3 "2017-04-08T04:12:58Z")

</div>

This has been 14.04 since I installed it a while back.. I could upgrade to 16, but will that stop the mysterious aufs issues which have come up from time to time?

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 4:14 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/4 "2017-04-08T04:14:37Z")

</div>

I ran discourse just fine on 14.04…i’m confused

Have you done: `sudo apt-get install \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual` from [the installation guide](https://docs.docker.com/engine/installation/linux/ubuntu/#recommended-extra-packages-for-trusty-1404)?

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 4:18 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/5 "2017-04-08T04:18:05Z")

</div>

> [@watchmanmonitor](#):
>
> This has been 14.04 since I installed it a while back.. I could upgrade to 16, but will that stop the mysterious aufs issues which have come up from time to time?

Yup, it certainly will! I’ve been sysadmin for two discourse installs, so can vouch for it not sucking. Just ensure you follow the docker install instructions.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 4:28 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/6 "2017-04-08T04:28:11Z")

</div>

Well then… that’s reason enough to upgrade to ubuntu 16 ❤

After the latest apt-get upgrade, the right `3.13.0-71` image-extra package was missing, hence the aufs error.

The command you linked to solved it for now, I’ll be making backups of all my discourse hosts & upgrading.

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 4:30 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/7 "2017-04-08T04:30:35Z")

</div>

You don’t need to upgrade now…you won’t have an issue…but you REALLY should at some point 🙂

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 4:32 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/8 "2017-04-08T04:32:13Z")

</div>

Upgrade now, when I’m ready for issues? Or when some random apt-get upgrade will stop the show?

Hahaha, thanks, this is plenty reason to start the process of upgrading.

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 4:54 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/9 "2017-04-08T04:54:40Z")

</div>

> [@watchmanmonitor](#):
>
> Upgrade now, when I’m ready for issues? Or when some random apt-get upgrade will stop the show?
> 
> Hahaha, thanks, this is plenty reason to start the process of upgrading.

You didn’t install a package dependency, which is in the docker installation guide… that’s what caused your problem.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [Avril 8, 2017, 4:57 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/10 "2017-04-08T04:57:18Z")

</div>

This has always been an odd problem to me since the [official install](https://meta.discourse.org/t/142537?silent=true) guide says to use the wget command from `get.docker.com` to install Docker. And I have _never_ observed this problem on any install we did, which obviously follows the official guide slavishly.

`wget -qO- https://get.docker.com/ | sh`

So this implies people who do have this problem installed Docker in some oddball, non-install-guide way… somehow.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 5:00 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/11 "2017-04-08T05:00:38Z")

</div>

I dunno about the docker aspect.. this instance has been running fine for over a year, through other docker upgrades even.

Today I did `apt-get upgrade` and I got fussed at about a lack of aufs. I don’t even think it was a docker issue, but a mismatch of kernel & image-extra. If ubuntu 16 resolves that issue, I’m going to put image-extra out of my life with an OS upgrade.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 5:06 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/12 "2017-04-08T05:06:02Z")

</div>

This is the start of this host’s .bash\_history

```bash
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=1024k
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
wget -qO- https://get.docker.com/ | sh
mkdir /var/discourse
cd /var/discourse
git clone https://github.com/discourse/discourse_docker.git /var/discourse
ls -al
vi containers/app.yml
apt-get update

```

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 5:15 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/13 "2017-04-08T05:15:28Z")

</div>

> [@codinghorror](#):
>
> wget -qO- [https://get.docker.com/](https://get.docker.com/) | sh

Didn’t docker silently deprecate this method?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [Avril 8, 2017, 5:27 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/14 "2017-04-08T05:27:28Z")

</div>

Nope try it yourself and see.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 5:37 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/15 "2017-04-08T05:37:08Z")

</div>

Too bad it didn’t include a trigger to always add the kernel’s related image-extras package.

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 6:38 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/16 "2017-04-08T06:38:07Z")

</div>

> [@codinghorror](#):
>
> Nope try it yourself and see.

It works – but it could stop working at any time is what I mean.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 6:39 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/17 "2017-04-08T06:39:15Z")

</div>

Soooo what’d they replace it with?

---

<div class="post-metadata">

### Author: ![robbyoconnor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robbyoconnor/32/120330_2.png) [@robbyoconnor](https://meta.discourse.org/u/robbyoconnor)
#### Post date: [Avril 8, 2017, 6:40 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/18 "2017-04-08T06:40:35Z")

</div>

> [@watchmanmonitor](#):
>
> Soooo what’d they replace it with?

[this](https://docs.docker.com/engine/installation/linux/ubuntu/#install-from-a-package) – I actually use ansible to install docker in almost all cases.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [Avril 8, 2017, 6:41 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/19 "2017-04-08T06:41:30Z")

</div>

Does it help prevent aufs related failures after `apt-get upgrade`s?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [Avril 8, 2017, 6:43 UTC](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627/20 "2017-04-08T06:43:15Z")

</div>

Still something super hinky with this as we literally _never_ saw this problem with hundreds of official guide based installs across a period of _literally years_. Did you add any “extra” stuff or steps?

(I agree it has been reported on meta a few times but I strongly suspect “extra” things were done…)

[Page suivante](https://meta.discourse.org/t/problems-with-docker-and-kernel-on-digital-ocean/60627.md?page=2)
