Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-12102

Can´t start via systemd but only with mysqld_safe

    XMLWordPrintable

Details

    Description

      SELinux is disabled. "datadir" points to a different location (/mysql/data).

      Starting MariaDB via systemd fails with the following entries in /var/log/messages:

      Feb 21 09:54:53 node3 systemd: Starting MariaDB database server...
      Feb 21 09:54:54 node3 sh: 2017-02-21  9:54:54 140406696990976 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 3448 ...
      Feb 21 09:54:57 node3 sh: WSREP: Recovered position ded77f9d-d376-11e5-a55e-aafa472da560:34395298
      Feb 21 09:54:57 node3 mysqld: 2017-02-21  9:54:57 139832490531072 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 3481 ...
      Feb 21 09:54:57 node3 mysqld: 2017-02-21  9:54:57 139832490531072 [Warning] Can't create test file /var/lib/mysql/node3.lower-test
      Feb 21 09:54:57 node3 mysqld: #007/usr/sbin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 "No such file or directory")
      Feb 21 09:54:57 node3 mysqld: 2017-02-21  9:54:57 139832490531072 [ERROR] Aborting
      Feb 21 09:54:57 node3 systemd: mariadb.service: main process exited, code=exited, status=1/FAILURE
      Feb 21 09:54:57 node3 systemd: Failed to start MariaDB database server.
      Feb 21 09:54:57 node3 systemd: Unit mariadb.service entered failed state.
      Feb 21 09:54:57 node3 systemd: mariadb.service failed.
      

      It looks like systemd completely ignores the configuration.

      Starting it via "mysqld_safe --verbose --user=mysql &" works like a charm:

      170221 09:57:07 mysqld_safe WSREP: Running position recovery with --log_error='/mysql/data/wsrep_recovery.Yqi3QT' --pid-file='/mysql/data/node3.cluster.local-recover.pid'
      2017-02-21  9:57:07 140438949714176 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 3775 ...
      170221 09:57:11 mysqld_safe WSREP: Recovered position ded77f9d-d376-11e5-a55e-aafa472da560:34395298
      2017-02-21  9:57:11 139689894865152 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 3816 ...
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: Read nil XID from storage engines, skipping position init
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: wsrep_load(): Galera 25.3.19(r3667) by Codership Oy <info@codership.com> loaded successfully.
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: CRC-32C: using hardware acceleration.
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: Found saved state: ded77f9d-d376-11e5-a55e-aafa472da560:34395298, safe_to_bootsrap: 0
      2017-02-21  9:57:11 139689894865152 [Note] WSREP: Passing config to GCS: base_dir = /mysql/wsrep; base_host = 192.168.1.10; base_port = 4567; ...
      ...
      2017-02-21  9:57:20 139689894546176 [Note] WSREP: Synchronized with group, ready for connections
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            UweB Uwe Beierlein
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.