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

MariaDB - mysqld cannot start when restarting from systemd

    XMLWordPrintable

    Details

      Description

      MariaDB - mysqld cannot start when restarting from systemd

      s390vsl048:~/tmpmariadb # systemctl restart mysql.service
      s390vsl048:~/tmpmariadb # mysql -u ssluser -pssluser -D test --ssl-cipher=DHE-RSA-AES256-SHA:AES128-SHA --ssl-ca=/etc/mysql/certs/ca-cert.pem --ssl-cert=/etc/mysql/certs/client-cert.pem --ssl-key=/etc/mysql/certs/client-key.pem
      ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 104 "Connection reset by peer"

      s390vsl048:~/tmpmariadb # systemctl status mysql.service
      mysql.service - LSB: Start the MySQL database server
         Loaded: loaded (/etc/init.d/mysql)
         Active: active (exited) since Fri 2015-03-06 17:57:33 CET; 3min 21s ago
        Process: 6875 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
        Process: 6942 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
       
      Mar 06 17:57:33 s390vsl048 mysql[6942]: Starting service MySQL Starting service MySQL ..done

      s390vsl048:~/tmpmariadb # systemctl restart mysql.service
      Job for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xn" for details.

      s390vsl048:~/tmpmariadb # journalctl -xn
      -- Logs begin at Fri 2015-03-06 17:46:11 CET, end at Fri 2015-03-06 18:01:30 CET. --
      Mar 06 17:57:33 s390vsl048 mysql[6942]: Starting service MySQL Starting service MySQL ..done
      Mar 06 18:00:01 s390vsl048 kernel: type=1006 audit(1425661201.794:45): pid=7221 uid=0 old auid=4294967295 new auid=0 old ses=4294967295 new ses=4 res=1
      Mar 06 18:00:01 s390vsl048 cron[7221]: pam_unix(crond:session): session opened for user root by (uid=0)
      Mar 06 18:00:01 s390vsl048 CRON[7221]: pam_unix(crond:session): session closed for user root
      Mar 06 18:01:30 s390vsl048 systemd[1]: Stopping LSB: Start the MySQL database server...
      -- Subject: Unit mysql.service has begun shutting down
      -- Defined-By: systemd
      -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
      -- 
      -- Unit mysql.service has begun shutting down.
      Mar 06 18:01:30 s390vsl048 mysql[7289]: Shutting down service MySQL ..done
      Mar 06 18:01:30 s390vsl048 mysql[7318]: Starting service MySQL Starting service MySQL chmod: cannot access '/var/run/mysql/mysqld.pid': No such file or directory
      Mar 06 18:01:30 s390vsl048 systemd[1]: Failed to start LSB: Start the MySQL database server.
      -- Subject: Unit mysql.service has failed
      -- Defined-By: systemd
      -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
      -- 
      -- Unit mysql.service has failed.
      -- 
      -- The result is failed.
      Mar 06 18:01:30 s390vsl048 systemd[1]: Unit mysql.service entered failed state.
      Mar 06 18:01:30 s390vsl048 mysql[7318]: ..failed

      == mysqld.log ==

      150306 17:57:32 [Note] /usr/sbin/mysqld: Shutdown complete
       
      150306 17:57:32 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      150306 17:57:32 [Note] InnoDB: Using mutexes to ref count buffer pool pages
      150306 17:57:32 [Note] InnoDB: The InnoDB memory heap is disabled
      150306 17:57:32 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      150306 17:57:32 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
      150306 17:57:32 [Note] InnoDB: Compressed tables use zlib 1.2.8
      150306 17:57:32 [Note] InnoDB: Using Linux native AIO
      150306 17:57:32 [Note] InnoDB: Not using CPU crc32 instructions
      150306 17:57:32 [Note] InnoDB: Initializing buffer pool, size = 128.0M
      150306 17:57:32 [Note] InnoDB: Completed initialization of buffer pool
      150306 17:57:32 [Note] InnoDB: Highest supported file format is Barracuda.
      150306 17:57:33 [Note] InnoDB: 128 rollback segment(s) are active.
      150306 17:57:33 [Note] InnoDB: Waiting for purge to start
      150306 17:57:33 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 1616797
      150306 17:57:33 [Note] Server socket created on IP: '::'.
      150306 17:57:33 [Note] Event Scheduler: Loaded 0 events
      150306 17:57:33 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.0.16-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 3306  openSUSE package
      150306 17:57:33 mysqld_safe Number of processes running now: 1
      150306 17:57:33 mysqld_safe mysqld process hanging, pid 7111 - killed
      150306 17:57:33 mysqld_safe mysqld restarted
      150306 17:57:33 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
      150306 17:57:34 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
      150306 17:57:35 [Note] InnoDB: Using mutexes to ref count buffer pool pages
      150306 17:57:35 [Note] InnoDB: The InnoDB memory heap is disabled
      150306 17:57:35 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      150306 17:57:35 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
      150306 17:57:35 [Note] InnoDB: Compressed tables use zlib 1.2.8
      150306 17:57:35 [Note] InnoDB: Using Linux native AIO
      150306 17:57:35 [Note] InnoDB: Not using CPU crc32 instructions
      150306 17:57:35 [ERROR] mysqld: Can't create/write to file '/var/tmp/mysql.DjJntU/ibuao7B9' (Errcode: 2 "No such file or directory")
      2015-03-06 17:57:35 3fffd051730  InnoDB: Error: unable to create temporary file; errno: 2
      150306 17:57:35 [ERROR] Plugin 'InnoDB' init function returned error.
      150306 17:57:35 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      150306 17:57:35 [ERROR] Unknown/unsupported storage engine: InnoDB
      150306 17:57:35 [ERROR] Aborting
       
      150306 17:57:35 [Note] /usr/sbin/mysqld: Shutdown complete

      Workaround: - use stop and start
      ================================

      s390vsl048:~/tmpmariadb # systemctl stop mysql.service
      s390vsl048:~/tmpmariadb # systemctl status mysql.service
      mysql.service - LSB: Start the MySQL database server
         Loaded: loaded (/etc/init.d/mysql)
         Active: failed (Result: exit-code) since Fri 2015-03-06 18:01:30 CET; 54s ago
        Process: 7289 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
        Process: 7318 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
       
      Mar 06 18:01:30 s390vsl048 mysql[7318]: Starting service MySQL Starting service MySQL chmod: cannot access '/var/run/mysql/mysqld.pid': No such file or directory
      Mar 06 18:01:30 s390vsl048 systemd[1]: Failed to start LSB: Start the MySQL database server.
      Mar 06 18:01:30 s390vsl048 systemd[1]: Unit mysql.service entered failed state.
      Mar 06 18:01:30 s390vsl048 mysql[7318]: ..failed

      s390vsl048:~/tmpmariadb # systemctl start mysql.service
      s390vsl048:~/tmpmariadb # systemctl status mysql.service
      mysql.service - LSB: Start the MySQL database server
         Loaded: loaded (/etc/init.d/mysql)
         Active: active (running) since Fri 2015-03-06 18:02:29 CET; 1s ago
        Process: 7289 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
        Process: 7542 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
         CGroup: /system.slice/mysql.service
                 |-7366 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/var/lib/mysql...
                 `-7487 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysql/mysqld.log --pid-fil...
       
      Mar 06 18:02:29 s390vsl048 mysql[7542]: ..done
      s390vsl048:~/tmpmariadb # mysql -u ssluser -pssluser -D test --ssl-cipher=DHE-RSA-AES256-SHA:AES128-SHA --ssl-ca=/etc/mysql/certs/ca-cert.pem --ssl-cert=/etc/mysql/certs/client-cert.pem --ssl-key=/etc/mysql/certs/client-key.pem
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 2
      Server version: 10.0.16-MariaDB openSUSE package

      Note:
      Cannot reproduce on every system but looks like on s390 is 100 reproducible.

      https://bugzilla.suse.com/show_bug.cgi?id=921115

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              nirbhay_c Nirbhay Choubey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: