Skip to content

supervisor does not stop mysqld #52

Description

@cbautista1002

When I tell supervisor to stop the mysql service, it claims that it did, but it does not:

supervisor> stop mysql
mysql: stopped
supervisor> exit

bash-4.3# ps -ef | grep -i mysql
62445 mysql      0:26 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

It then fails to start it (since it was never stopped):

bash-4.3# supervisorctl start mysql
mysql: ERROR (abnormal termination)

The mysqld log files shows that it cannot start if its already running:

bash-4.3# tail -f /var/log/mysqld.log
150409 22:31:53 mysqld_safe A mysqld process already exists
150409 22:31:54 mysqld_safe Logging to '/var/log/mysqld.log'.
150409 22:31:54 mysqld_safe A mysqld process already exists
150409 22:31:54 mysqld_safe A mysqld process already exists
150409 22:31:56 mysqld_safe Logging to '/var/log/mysqld.log'.
150409 22:31:56 mysqld_safe A mysqld process already exists
150409 22:31:56 mysqld_safe A mysqld process already exists
150409 22:31:59 mysqld_safe Logging to '/var/log/mysqld.log'.
150409 22:31:59 mysqld_safe A mysqld process already exists
150409 22:31:59 mysqld_safe A mysqld process already exists

If I kill mysqld then supervisor is able to start it:

bash-4.3# kill -9 62445
bash-4.3# supervisorctl start mysql
mysql: started
bash-4.3# supervisorctl status
httpd                            RUNNING   pid 61645, uptime 0:12:37
map                              RUNNING   pid 62468, uptime 0:12:04
mysql                            RUNNING   pid 63350, uptime 0:00:07
sshd                             RUNNING   pid 61646, uptime 0:12:37

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions