AppArmor issue. No MySQL connection

3 posts / 0 new
Last post
#1 Mon, 10/16/2017 - 16:12
adelphia
adelphia's picture

AppArmor issue. No MySQL connection

Not sure what's happened, but I've suddenly run into an issue with my Virtualmin config stating MySQL is not running.

Digging deeper, I also notice an error when starting the system which has to do with AppArmor not starting.

The error using journalctl -b is:

Oct 16 21:50:43 server systemd[1]: apparmor.service: Control process exited, code=exited status=123
Oct 16 21:50:43 server systemd[1]: Failed to start LSB: AppArmor initialization.
Oct 16 21:50:43 server systemd[1]: apparmor.service: Unit entered failed state.
Oct 16 21:50:43 server systemd[1]: apparmor.service: Failed with result 'exit-code'.

and viewing the AppArmor status I get:

● apparmor.service - LSB: AppArmor initialization
   Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-10-16 22:02:41 BST; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7267 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)

Oct 16 22:02:40 server apparmor[7267]:  * Starting AppArmor profiles
Oct 16 22:02:40 server apparmor[7267]: Found reference to variable HOME, but is never declared
Oct 16 22:02:40 server apparmor[7267]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Oct 16 22:02:40 server apparmor[7267]: Found reference to variable HOME, but is never declared
Oct 16 22:02:41 server apparmor[7267]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Oct 16 22:02:41 server apparmor[7267]:    ...fail!
Oct 16 22:02:41 server systemd[1]: apparmor.service: Control process exited, code=exited status=123
Oct 16 22:02:41 server systemd[1]: Failed to start LSB: AppArmor initialization.
Oct 16 22:02:41 server systemd[1]: apparmor.service: Unit entered failed state.
Oct 16 22:02:41 server systemd[1]: apparmor.service: Failed with result 'exit-code'.

Could someone let me know how to fix this or give me a hand to try to please as I don't really want to have to start over; I wish there was a "repair" function for Virtualmin install ;(

Thanks again

-------------------------------------------------------------
Server OS: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (updated daily)
-------------------------------------------------------------
Chris: Adelphia Interactive

Tue, 10/17/2017 - 03:17
adelphia
adelphia's picture

Hmm. Don't know what happened but for some reason my MySQL installation became corrupt. Reinstalled MySQL (using apt-get install mysql-server) and things seem to be fixed with MySQL. No idea what happened but the errors pointing to MySQL have been resolved.

Now just to sort AppArmor.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Tue, 10/17/2017 - 16:15
adelphia
adelphia's picture

OK, I need this sorted quite urgently so I've decided to reinstall. I've backed up all my domains, emails and settings so hopefully I'll get it all back as it was but without the errors provided the errors weren't backed up too!

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Topic locked