Article 5K8H7 [SOLVED] Apparmor failed to start - ubuntu 16.04

[SOLVED] Apparmor failed to start - ubuntu 16.04

by
tuxthegreat
from LinuxQuestions.org on (#5K8H7)
I have a Ubuntu 16.04 installation with a problem, the apparmor failed to start. Here is the output
Code:root@odroid:~# systemctl status apparmor
apparmor.service - LSB: AppArmor initialization
Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-06-11 02:00:35 CEST; 1 weeks 0 days ago
Docs: man:systemd-sysv-generator(8)

Jun 11 02:00:35 odroid apparmor[501]: AppArmor parser error for /etc/apparmor.d/usr.lib.snapd.snap-confine.real in
Jun 11 02:00:35 odroid apparmor[501]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Jun 11 02:00:35 odroid apparmor[501]: AppArmor parser error for /etc/apparmor.d/usr.lib.snapd.snap-confine.real in
Jun 11 02:00:35 odroid apparmor[501]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Jun 11 02:00:35 odroid apparmor[501]: ...fail!
Jun 11 02:00:35 odroid systemd[1]: apparmor.service: Control process exited, code=exited status=123
Jun 11 02:00:35 odroid systemd[1]: Failed to start LSB: AppArmor initialization.
Jun 11 02:00:35 odroid systemd[1]: apparmor.service: Unit entered failed state.
Jun 11 02:00:35 odroid systemd[1]: apparmor.service: Failed with result 'exit-code'.
Jun 18 23:27:56 odroid systemd[1]: apparmor.service: Unit cannot be reloaded because it is inactive. Any idea what can be wrong ?

PS I solved the issue by doing the following:

Code:$ find /etc/apparmor.d/ -iname "*snap*"
/etc/apparmor.d/usr.lib.snapd.snap-confine.real
/etc/apparmor.d/cache/usr.lib.snapd.snap-confine.real
/etc/apparmor.d/local/usr.lib.snapd.snap-confine.realThen I moved those 3 files to a secure location /home/odroid/Downloads and now Apparmor starts just fine.
Code:root@odroid:~# systemctl status apparmor
apparmor.service - LSB: AppArmor initialization
Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
Active: active (exited) since Fri 2021-06-18 23:38:42 CEST; 8s ago
Docs: man:systemd-sysv-generator(8)
Process: 6429 ExecStart=/etc/init.d/apparmor start (code=exited, status=0/SUCCESS)

Jun 18 23:38:42 odroid systemd[1]: Starting LSB: AppArmor initialization...
Jun 18 23:38:42 odroid apparmor[6429]: * Starting AppArmor profiles
Jun 18 23:38:42 odroid apparmor[6429]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Jun 18 23:38:42 odroid apparmor[6429]: ...done.
Jun 18 23:38:42 odroid systemd[1]: Started LSB: AppArmor initialization.latest?d=yIl2AUoC8zA latest?i=qe-5A0ATTXc:0MkYmG6ff_A:F7zBnMy latest?i=qe-5A0ATTXc:0MkYmG6ff_A:V_sGLiP latest?d=qj6IDK7rITs latest?i=qe-5A0ATTXc:0MkYmG6ff_A:gIN9vFwqe-5A0ATTXc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments