Cant start AppArmor Service

n1ete

New Member
Feb 26, 2017
16
1
1
41
I think i break somehow the /etc/apparmor.d/lxc/lxc default files

but cant figure out how

Code:
root@proxmox:~# /etc/init.d/apparmor start
[....] Starting apparmor (via systemctl): apparmor.serviceJob for apparmor.service failed. See 'systemctl status apparmor.service' and 'journalctl -xn' for details.
 failed!
root@proxmox:~# systemctl status apparmor.service
● apparmor.service - LSB: AppArmor initialization
   Loaded: loaded (/etc/init.d/apparmor)
   Active: failed (Result: exit-code) since Mon 2017-03-06 00:27:03 CET; 21s ago
  Process: 5141 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)

Mar 06 00:27:03 proxmox apparmor[5141]: Starting AppArmor profiles:AppArmor parser error for /etc/apparmor.d/...styoe
Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa... rule
Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa...styoe
Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa... rule
Mar 06 00:27:03 proxmox apparmor[5141]: failed!
Mar 06 00:27:03 proxmox systemd[1]: apparmor.service: control process exited, code=exited status=123
Mar 06 00:27:03 proxmox systemd[1]: Failed to start LSB: AppArmor initialization.
Mar 06 00:27:03 proxmox systemd[1]: Unit apparmor.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Is there any way to restore them to default?


my app armor default container looks like this

Code:
# Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which
# will source all profiles under /etc/apparmor.d/lxc

profile lxc-container-default flags=(attach_disconnected,mediate_deleted) {
  #include <abstractions/lxc/container-base>

  # the container may never be allowed to mount devpts.  If it does, it
  # will remount the host's devpts.  We could allow it to do it with
  # the newinstance option (but, right now, we don't).
  deny mount fstype=devpts,

}
 
Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa... rule Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa...styoe Mar 06 00:27:03 proxmox apparmor[5141]: AppArmor parser error for /etc/apparmor.d/lxc-containers in /etc/appa... rule
it seems like there are syntax errors in the apparmor profiles?

try to execute the status with -l to see which files are not ok and see if you can correct them
 
  • Like
Reactions: n1ete