rbicker / ansible-nextcloud

nextcloud ansible role
24 stars 18 forks source link

Playbook fails on "ensure mariadb-server is enabled and started" step #12

Closed jimmyface closed 6 years ago

jimmyface commented 6 years ago

Granted I'm running CentOS 7.5, but I thought I'd report. The playbook failed for me on the "ensure mariadb-server is enabled and started" step.

fatal: [nextcloud]: FAILED! => {"changed": false, "msg": "Unable to start service mariadb: Job for mariadb.service failed because the control process exited with error code. See \"systemctl status mariadb.service\" and \"journalctl -xe\" for details.\n"}

Mariadb didn't like this particular option which the playbook adds to /etc/my.cnf.d/server.cnf:

explicit_defaults_for_timestamp=1

If I run the play without having it add that option in mariadb config it completes successfully.

lalmeras commented 6 years ago

Confirmed here. Option was not in my file, as it is added only when: mariadb_installation.changed, but if I add the option manually, mariadb does not start and complains about this option:

180904  8:57:08 Percona XtraDB (http://www.percona.com) 5.5.59-MariaDB-38.11 started; log sequence number 859316839
180904  8:57:08 [Note] Plugin 'FEEDBACK' is disabled.
180904  8:57:08 [ERROR] /usr/libexec/mysqld: unknown variable 'explicit_defaults_for_timestamp=1'
180904  8:57:08 [ERROR] Aborting
[lalmeras@nextcloud ~]$ cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 
[lalmeras@nextcloud ~]$ rpm -qa mariadb
mariadb-5.5.60-1.el7_5.x86_64
rbicker commented 6 years ago

The problem was that this option was introduced in mysql version 5.6. As we are using custom mirrors, we got more recent mysql versions so we did not see this issue. Should be fixed now.