0

I'm using Plesk panel to host my websites. Recently, it stops getting updates. I can see error stating I should run "dpkg --configure -a", but when I do, server stoprs responding and I have to reboot it. I'm using Ubuntu 14.

Where should I look further?

Johnny
  • 3
  • 2

1 Answers1

0

The most probable reason for such behavior is the Ubuntu kernel bug - #1579135: AppArmor profile reloading causes an intermittent kernel BUG. Newer AppArmor packages are not compatible with the old kernel.

Here are the steps to resolve it:

1. Temporarily remove AppArmor post-install scripts in order to prevent AppArmor from reloading:

# mv /var/lib/dpkg/info/apparmor.postinst ~/
# mv /var/lib/dpkg/info/apparmor-profiles.postinst ~/

2. Disable AppArmor:

# service apparmor stop
# service apparmor teardown
# update-rc.d -f apparmor remove

3. Run dpkg --configure -a to fix the initial error:

# dpkg --configure -a

4. Upgrade Ubuntu kernel to version 4.4.0-38.57 or newer and reboot the server. For example, for version 4.4.0-72:

# apt update
# apt install linux-image-4.4.0-72-generic
# sudo reboot

5. Move back AppArmor post-install scripts and reconfigure apparmor-profiles package:

# mv ~/apparmor.postinst /var/lib/dpkg/info/
# mv ~/apparmor-profiles.postinst /var/lib/dpkg/info/
# dpkg-reconfigure apparmor
# dpkg-reconfigure apparmor-profiles

6. Start AppArmor:

# service apparmor start
Elvis Plesky
  • 3,190
  • 1
  • 12
  • 21