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

Restarting mariadb-server 10 service on ubuntu 14.04 fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.0.13-galera
    • N/A
    • OTHER
    • None
    • ubuntu 14.04

    Description

      I installed mariadb via the ubuntu 14.04 repo and documentation provided on mariadb.org.

      I found the /etc/init.d/mysql script wasn't waiting for mysqld to fully shutdown after running mysqladmin shutdown in the init script. There is logic that looks for an error condition and then runs a sequence to verify it has finished shutting down.

      For some reason, it is not able to return an error condition for mysqladmin shutdown on this platform, so the stop() function completes too early and then start() fails and this leaves the mysql process not running. If you run service mysql restart again, it works, because enough time has passed for mysqladmin shutdown to complete.

      I found I could fix this by forcing the following shell script code to run immediately after this line:

          shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?    

      but before this line:

           if [ "$r" -ne 0 ]; then

      new code:

      for i in `seq 1 600`; do
      sleep 1
      if mysqld_status check_dead nowarn; then server_down=1; break; fi
      done

      Please verify/fix for the benefit of others.

      I'm also using the innodb pool dump feature, which makes it take longer to shutdown possibly.

      Attachments

        1. mysql-confd-file.txt
          1 kB
          Bruce Kirkpatrick
        2. my.cnf.txt
          1 kB
          Bruce Kirkpatrick

        Activity

          People

            Unassigned Unassigned
            farbeyondcode Bruce Kirkpatrick
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.