I was running an unprivileged LXC and converted it to a privileged one (backed it up and then restored with it set to privileged) and now I have issues with Apparmor. My main problem is starting a Docker container
But apparmor in general does not seem to work right
I already tried to reinstall Apparmor, but that didn't help.
Has anyone an idea how to solve the issue?
Code:
~/pihole$ docker-compose up
Creating network "pihole_default" with the default driver
Creating pihole ... error
ERROR: for pihole Cannot start service pihole: 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-default867319686` failed with output: apparmor_parser: Unable to replace "docker-default". Permission denied; attempted to load a profile while confined?
error: exit status 243
ERROR: for pihole Cannot start service pihole: 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-default867319686` failed with output: apparmor_parser: Unable to replace "docker-default". Permission denied; attempted to load a profile while confined?
error: exit status 243
ERROR: Encountered errors while bringing up the project.
But apparmor in general does not seem to work right
Code:
$ sudo systemctl status apparmor.service
* apparmor.service - Load AppArmor profiles
Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-11-02 18:22:00 UTC; 8s ago
Docs: man:apparmor(7)
https://gitlab.com/apparmor/apparmor/wikis/home/
Process: 12106 ExecStart=/lib/apparmor/apparmor.systemd reload (code=exited, status=1/FAILURE)
Main PID: 12106 (code=exited, status=1/FAILURE)
Nov 02 18:22:00 Docker apparmor.systemd[12111]: /sbin/apparmor_parser: Unable to replace "lsb_release". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12112]: /sbin/apparmor_parser: Unable to replace "kmod". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12112]: /sbin/apparmor_parser: Unable to replace "nvidia_modprobe". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12132]: /sbin/apparmor_parser: Unable to replace "lsb_release". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12133]: /sbin/apparmor_parser: Unable to replace "kmod". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12133]: /sbin/apparmor_parser: Unable to replace "nvidia_modprobe". Permission denied; attempted to load a profile while confined?
Nov 02 18:22:00 Docker apparmor.systemd[12106]: Error: At least one profile failed to load
Nov 02 18:22:00 Docker systemd[1]: apparmor.service: Main process exited, code=exited, status=1/FAILURE
Nov 02 18:22:00 Docker systemd[1]: apparmor.service: Failed with result 'exit-code'.
Nov 02 18:22:00 Docker systemd[1]: Failed to start Load AppArmor profiles.
I already tried to reinstall Apparmor, but that didn't help.
Has anyone an idea how to solve the issue?
Last edited: