Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

3.2.7. トラブルシューティング

本セクションでは、発生する可能性のある問題と、考えられる解決策を説明します。

3.2.7.1. Linux ネイティブ AIO の障害

現象

MySQL コンテナーが起動に失敗し、以下のようなログを出力します。

151113  5:06:56 InnoDB: Using Linux native AIO
151113  5:06:56  InnoDB: Warning: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
InnoDB: Warning: io_setup() attempt 1 failed.
InnoDB: Warning: io_setup() attempt 2 failed.
Waiting for MySQL to start ...
InnoDB: Warning: io_setup() attempt 3 failed.
InnoDB: Warning: io_setup() attempt 4 failed.
Waiting for MySQL to start ...
InnoDB: Warning: io_setup() attempt 5 failed.
151113  5:06:59  InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts.
InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
151113  5:06:59 InnoDB: Fatal error: cannot initialize AIO sub-system
151113  5:06:59 [ERROR] Plugin 'InnoDB' init function returned error.
151113  5:06:59 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151113  5:06:59 [ERROR] Unknown/unsupported storage engine: InnoDB
151113  5:06:59 [ERROR] Aborting

説明

MySQL のストレージエンジンは、リソース制限が原因で、カーネルの AIO(非同期 I/O) 機能を使用できませんでした。

解決策

環境変数 MYSQL_AIO の値を 0 に設定して、AIO の使用を完全に停止します。後続のデプロイメントでは、この設定により MySQL 設定変数 innodb_use_native_aio の値が 0 に指定されます。

または、aio-max-nr カーネルリソースを増やします。以下の例では、現在の aio-max-nr の値を検証して、この値を 2 倍にします。

$ sysctl fs.aio-max-nr
fs.aio-max-nr = 1048576
# sysctl -w fs.aio-max-nr=2097152

これはノードごとの解決策であり、次のノードが再起動するまで続きます。