Comment 2 for bug 1778984

Revision history for this message
Shawn Authement (thesteelrider) wrote :

I have just hit this problem on Ubuntu 18.04, and I was able to solve it by running
root@ubuntu:~# sudo dpkg-reconfigure apparmor

Unlike the previous poster, I am not aware of any sudden powercycles. I simply attempted to run a docker container. The docker command and output are below, with PII redacted.

docker run --rm -v /home/[REDACTED]/projects/snap/out/log:/log -v /home/[REDACTED]/projects/snap/django:/tmslogs -v /home/[REDACTED]/projects/snap/out/db:/db -v /home/[REDACTED]/projects/snap/out/media:/media -v /home/[REDACTED]/projects/snap/out/dumps:/dumps -v /home/[REDACTED]/projects/snap/config:/config -t -i [REDACTED].com/tmslogs:latest /bin/bash

docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `/sbin/apparmor_parser apparmor_parser -Kr /var/lib/docker/tmp/docker-default964375229` failed with output: AppArmor parser error for /var/lib/docker/tmp/docker-default964375229 in /etc/apparmor.d/tunables/home.d/ubuntu at line 7: Found unexpected character: ''

root@ubuntu:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"

root@ubuntu:~# uname -a
Linux ubuntu 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

root@ubuntu:~# docker --version
Docker version 17.12.1-ce, build 7390fc6

root@ubuntu:~# cat /etc/apparmor.d/tunables/home.d/ubuntu
# This file is auto-generated. It is recommended you update it using:
# $ sudo dpkg-reconfigure apparmor
#
# The following is a space-separated list of where additional user home
# directories are stored, each must have a trailing '/'. Directories added
# here are appended to @{HOMEDIRS}. See tunables/home for details.
root@ubuntu:~#

I followed the hint in /etc/apparmor.d/tunables/home.d/ubuntu and ran

root@ubuntu:~# sudo dpkg-reconfigure apparmor

This solved the problem.

After this solved the problem, this reminded me that I have modified my /home directories. After installing Ubuntu 18.04 and creating my default user account, I logged in and mounted a second drive into '/home'. Perhaps anyone looking into this issue, or experiencing this issue could take this clue and run with it.