[Bug 1610765] Re: Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it to fail to start

2017-08-18 Thread cripperz
@andreas 
Just a description how this happened again. Usually it would happen after the 
server lost power and reboot this error would come back. Or the VM abruptly off 
without a proper shutdown then i will hit into this issue. 



root@ns3:/etc/mysql#apparmor_parser -r -T -W -v /etc/apparmor.d/usr.sbin.mysqld
Replacement succeeded for "/usr/sbin/mysqld".
root@ns3:/etc/mysql#


For testing sake, i added below in the /etc/apparmor.d/usr.sbin.mysqld

  /sys/devices/system/node/* r,
  /sys/devices/system/node/ r,
  /sys/devices/system/node/node0/meminfo r,

  /proc/** rk,
  /proc/* rk,


then i get 

Aug 19 09:32:34 ns3 kernel: [ 9028.392694] audit: type=1400
audit(1503106354.767:603): apparmor="STATUS" operation="profile_replace"
profile="unconfined" name="/usr/sbin/mysqld" pid=6139
comm="apparmor_parser"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1610765

Title:
  Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it
  to fail to start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1610765/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1610765] Re: Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it to fail to start

2017-08-18 Thread cripperz
Aug 18 20:07:53 ns3 audit[7045]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/proc/7045/status" pid=7045 comm="mysqld" 
requested_mask="r" denied_mask="r" fsuid=111 ouid=111
I just stumbled again into the problem. took the chance to try your suggest 
@andreas 

below error

Aug 18 20:07:53 ns3 kernel: audit: type=1400 audit(1503058073.118:64): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" 
name="/proc/7045/status" pid=7045 comm="mysqld" requested_mask="r" 
denied_mask="r" fsuid=111 ouid=111
Aug 18 20:07:53 ns3 audit[7045]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=7045 
comm="mysqld" requested_mask="r" denied_mask="r" fsuid=111 ouid=0
Aug 18 20:07:53 ns3 audit[7045]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/proc/7045/status" pid=7045 comm="mysqld" 
requested_mask="r" denied_mask="r" fsuid=111 ouid=111
Aug 18 20:07:53 ns3 kernel: audit: type=1400 audit(1503058073.122:65): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" 
name="/sys/devices/system/node/" pid=7045 comm="mysqld" requested_mask="r" 
denied_mask="r" fsuid=111 ouid=0
Aug 18 20:07:53 ns3 kernel: audit: type=1400 audit(1503058073.122:66): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" 
name="/proc/7045/status" pid=7045 comm="mysqld" requested_mask="r" 
denied_mask="r" fsuid=111 ouid=111
Aug 18 20:07:54 ns3 systemd[1]: mysql.service: Main process exited, 
code=exited, status=1/FAILURE

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1610765

Title:
  Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it
  to fail to start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1610765/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1610765] Re: Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it to fail to start

2017-08-09 Thread cripperz
Just bumped into this error with my Ubuntu 16.04 LTS Server with
mysql-5.7

-- Unit mysql.service has begun starting up.
Aug 09 19:49:46 ns3 audit[3405]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/proc/3405/status" pid=340
Aug 09 19:49:46 ns3 audit[3405]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/sys/devices/system/node/"
Aug 09 19:49:46 ns3 audit[3405]: AVC apparmor="DENIED" operation="open" 
profile="/usr/sbin/mysqld" name="/proc/3405/status" pid=340
Aug 09 19:49:46 ns3 kernel: audit: type=1400 audit(1502279386.154:69): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld
Aug 09 19:49:46 ns3 kernel: audit: type=1400 audit(1502279386.154:70): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld
Aug 09 19:49:46 ns3 kernel: audit: type=1400 audit(1502279386.154:71): 
apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld
Aug 09 19:49:47 ns3 systemd[1]: mysql.service: Main process exited, 
code=exited, status=1/FAILURE

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1610765

Title:
  Apparmor refuses mysqld open on /etc/mysql/my.cnf.migrated causing it
  to fail to start

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1610765/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs