sous-chefs / mysql

Development repository for the mysql cookbook
https://supermarket.chef.io/cookbooks/mysql
Apache License 2.0
338 stars 690 forks source link

Mysql 5.7 won't start on Ubuntu Xenial. #545

Closed fr33l closed 6 years ago

fr33l commented 6 years ago

Cookbook version

7.0.0 - 8.5.1

Chef-client version

12.20.3

Platform Details

Ubuntu 16.04

Scenario:

Launch Mysql 5.7 instance on Ubuntu Xenial

Steps to Reproduce:

  mysql_service mysql-checkoutservice do
    port 3306
    initial_root_password some_pass
    action [:create, :start]
  end
end

Expected Result:

Running Mysql service

Actual Result:

================================================================================
    Error executing action `start` on resource 'mysql_service[checkoutservice]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    mysql_service_manager_systemd[checkoutservice] (/var/chef/cache/cookbooks/mysql/libraries/mysql_service.rb line 50) had an error: Mixlib::ShellOut::ShellCommandFailed: service[mysql-checkoutservice] (/var/chef/cache/cookbooks/mysql/libraries/mysql_service_manager_systemd.rb line 81) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
    ---- Begin output of /bin/systemctl --system start mysql-checkoutservice ----
    STDOUT: 
    STDERR: Job for mysql-checkoutservice.service failed because the control process exited with error code. See "systemctl status mysql-checkoutservice.service" and "journalctl -xe" for details.
    ---- End output of /bin/systemctl --system start mysql-checkoutservice ----
    Ran /bin/systemctl --system start mysql-checkoutservice returned 1

journalctl -xe

-- Unit mysql-checkoutservice.service has begun starting up.
Feb 08 13:31:01 multi kernel: audit_printk_skb: 120 callbacks suppressed
Feb 08 13:31:01 multi kernel: audit: type=1400 audit(1518096661.545:419): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/19374/status" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=999
Feb 08 13:31:01 multi kernel: audit: type=1400 audit(1518096661.545:420): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=0
Feb 08 13:31:01 multi kernel: audit: type=1400 audit(1518096661.545:421): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/19374/status" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=999
Feb 08 13:31:01 multi audit[19374]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/19374/status" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=999
Feb 08 13:31:01 multi audit[19374]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=0
Feb 08 13:31:01 multi audit[19374]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/19374/status" pid=19374 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=999 ouid=999
Feb 08 13:31:05 multi systemd[1]: mysql-checkoutservice.service: Main process exited, code=exited, status=1/FAILURE
Feb 08 13:31:05 multi systemd[1]: mysql-checkoutservice.service: Control process exited, code=exited status=1
Feb 08 13:31:05 multi systemd[1]: Failed to start mysql_service[mysql-checkoutservice].
-- Subject: Unit mysql-checkoutservice.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql-checkoutservice.service has failed.
-- 
-- The result is failed.
Feb 08 13:31:05 multi systemd[1]: mysql-checkoutservice.service: Unit entered failed state.
Feb 08 13:31:05 multi systemd[1]: mysql-checkoutservice.service: Failed with result 'exit-code'.
Feb 08 13:31:05 multi sudo[19341]: pam_unix(sudo:session): session closed for user root

I've tried adding these locations which apparmor denies, but it didn't helped, mysql service won't start manually.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.