web-dev-qa-db-ja.com

mysqlプロセスが終了する原因(クリーン)

Layer7と呼ばれるAPIマネージャーにmysql master-master(バージョン5.5.32)を使用しています。インスタンスを保持する2つのホストは同じESXにあります

時々、今のところmysqlはクリーンシャットダウンを実行しています。

Cronjobsをチェックしましたが、どれもありませんこの期間中にホストまたはインスタンスへのログインをチェックしましたが、何もありませんでした。

手動でのシャットダウン、スクリプトまたはアプリからのシャットダウン、またはマスター/マスター構成でクリーンシャットダウンを引き起こす可能性がある強制終了によるシャットダウン以外

これはインスタンスが停止したホストのログです

ありがとうございました

よろしく

150605 18:59:32 [Note] /usr/sbin/mysqld: Normal shutdown

150605 18:59:32 [Note] Event Scheduler: Purging the queue. 0 events
150605 18:59:32 [Note] Error reading relay log event: slave SQL thread was killed
150605 18:59:32 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
150605 18:59:32 [Note] Slave I/O thread killed while reading event
150605 18:59:32 [Note] Slave I/O thread exiting, read up to log 'ssgbin-log.000351', position 91210654
150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360878  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360872  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360871  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360864  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360860  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360859  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360858  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360857  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360855  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360854  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360853  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360851  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360849  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360848  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360847  user: 'gateway'

150605 18:59:34 [Warning] /usr/sbin/mysqld: Forcing close of thread 21360846  user: 'gateway'

150605 18:59:36  InnoDB: Starting shutdown...
150605 18:59:36  InnoDB: Waiting for 76 pages to be flushed
150605 18:59:37  InnoDB: Shutdown completed; log sequence number 5077358548454
150605 18:59:37 [Note] /usr/sbin/mysqld: Shutdown complete

150605 18:59:37 mysqld_safe mysqld from pid file /var/lib/mysql/mtllnl7.mtl.cbc.ca.pid ended
150605 18:59:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150605 18:59:38 [Note] Plugin 'FEDERATED' is disabled.
150605 18:59:38 [Note] Plugin 'partition' is disabled.
150605 18:59:38 InnoDB: The InnoDB memory heap is disabled
150605 18:59:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150605 18:59:38 InnoDB: Compressed tables use zlib 1.2.3
150605 18:59:38 InnoDB: Using Linux native AIO
150605 18:59:38 InnoDB: Initializing buffer pool, size = 512.0M
150605 18:59:38 InnoDB: Completed initialization of buffer pool
150605 18:59:38 InnoDB: highest supported file format is Barracuda.
150605 18:59:38  InnoDB: Waiting for the background threads to start
150605 18:59:39 InnoDB: 5.5.32 started; log sequence number 5077358548454
150605 18:59:39 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150605 18:59:39 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150605 18:59:39 [Note] Server socket created on IP: '0.0.0.0'.
150605 18:59:39 [Note] Slave SQL thread initialized, starting replication in log 'ssgbin-log.000351' at position 91210654, relay log '/var/lib/mysql/ssgrelay-bin.000635' position: 854358
150605 18:59:39 [Note] Slave I/O thread: connected to master '[email protected]:3307',replication started in log 'ssgbin-log.000351' at position 91210654
150605 18:59:39 [Note] Event Scheduler: Loaded 0 events
150605 18:59:39 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.32-enterprise-commercial-advanced-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Enterprise Server - Advanced Edition (Commercial)
150605 19:05:09 [Note] Slave: received end packet from server, apparent master shutdown:
150605 19:05:09 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'ssgbin-log.000351' at position 94453851
150605 19:05:09 [ERROR] Slave I/O: error reconnecting to master '[email protected]:3307' - retry-time: 10  retries: 86400, Error_code: 2003
150605 19:05:29 [Note] Slave: connected to master '[email protected]:3307',replication resumed in log 'ssgbin-log.000351' at position 94453851
2

SHUTDOWN特権は、mysqladminを実行している場合にのみ使用できます

SHUTDOWN grant を削除すると、ユーザーはmysqladmin shutdownを実行できなくなります。

あなたの実際の問題

質問に表示されているエラーログは、mysqldの再起動です。

150605 18:59:32 [Note] /usr/sbin/mysqld: Normal shutdown
.
.
.
150605 18:59:36  InnoDB: Starting shutdown...
150605 18:59:36  InnoDB: Waiting for 76 pages to be flushed
150605 18:59:37  InnoDB: Shutdown completed; log sequence number 5077358548454
150605 18:59:37 [Note] /usr/sbin/mysqld: Shutdown complete

150605 18:59:37 mysqld_safe mysqld from pid file /var/lib/mysql/mtllnl7.mtl.cbc.ca.pid ended
150605 18:59:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

mysqladminmysqldを起動または再起動できません。

誰かが何かを実行していますservice mysql restart

最初に履歴を実行する

# history | grep restart

表示される再起動に関連して何も起こらない場合は、service mysql restartを実行しているDBサーバーでcronjobを見つける必要があります。場合によっては、誰も覚えていないリモートサーバー上のcronjobである可能性があります。

2
RolandoMySQLDBA