質問編集履歴
3
解決方法を移動
test
CHANGED
File without changes
|
test
CHANGED
@@ -191,59 +191,3 @@
|
|
191
191
|
200310 13:27:25 mysqld_safe mysqld from pid file /var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid ended
|
192
192
|
|
193
193
|
```
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
### 3/11解決
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
/etc/monit.d/mysql.conf
|
202
|
-
|
203
|
-
1行目のpidファイル設定を変更し、テストしたところ正常動作しました。
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
```CentOS6
|
208
|
-
|
209
|
-
check process mysql with pidfile "/var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid"
|
210
|
-
|
211
|
-
start = "/etc/init.d/mysql start"
|
212
|
-
|
213
|
-
stop = "/etc/init.d/mysql stop"
|
214
|
-
|
215
|
-
if failed unixsocket /var/lib/mysql/mysql.sock with timeout 20 seconds then restart
|
216
|
-
|
217
|
-
if 5 restarts within 5 cycles then timeout
|
218
|
-
|
219
|
-
group mysql
|
220
|
-
|
221
|
-
```
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
[monit(log)]
|
226
|
-
|
227
|
-
```
|
228
|
-
|
229
|
-
[UTC Mar 11 03:46:25] info : 'ip-XXX-XXX-XXX-XXX' monitor on user request
|
230
|
-
|
231
|
-
[UTC Mar 11 03:46:25] info : 'mysql' monitor on user request
|
232
|
-
|
233
|
-
[UTC Mar 11 03:46:25] info : Monit daemon with PID 3500 awakened
|
234
|
-
|
235
|
-
[UTC Mar 11 03:46:25] info : Awakened by User defined signal 1
|
236
|
-
|
237
|
-
[UTC Mar 11 03:46:25] info : 'mysql' monitor action done
|
238
|
-
|
239
|
-
[UTC Mar 11 03:46:25] info : 'ip-XXX-XXX-XXX-XXX' monitor action done
|
240
|
-
|
241
|
-
[UTC Mar 11 03:46:25] error : 'mysql' process is not running
|
242
|
-
|
243
|
-
[UTC Mar 11 03:46:25] info : 'mysql' trying to restart
|
244
|
-
|
245
|
-
[UTC Mar 11 03:46:25] info : 'mysql' start: '/etc/init.d/mysql start'
|
246
|
-
|
247
|
-
[UTC Mar 11 03:47:31] info : 'mysql' process is running with pid 3783
|
248
|
-
|
249
|
-
```
|
2
結果追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -191,3 +191,59 @@
|
|
191
191
|
200310 13:27:25 mysqld_safe mysqld from pid file /var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid ended
|
192
192
|
|
193
193
|
```
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
### 3/11解決
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
/etc/monit.d/mysql.conf
|
202
|
+
|
203
|
+
1行目のpidファイル設定を変更し、テストしたところ正常動作しました。
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
```CentOS6
|
208
|
+
|
209
|
+
check process mysql with pidfile "/var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid"
|
210
|
+
|
211
|
+
start = "/etc/init.d/mysql start"
|
212
|
+
|
213
|
+
stop = "/etc/init.d/mysql stop"
|
214
|
+
|
215
|
+
if failed unixsocket /var/lib/mysql/mysql.sock with timeout 20 seconds then restart
|
216
|
+
|
217
|
+
if 5 restarts within 5 cycles then timeout
|
218
|
+
|
219
|
+
group mysql
|
220
|
+
|
221
|
+
```
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
[monit(log)]
|
226
|
+
|
227
|
+
```
|
228
|
+
|
229
|
+
[UTC Mar 11 03:46:25] info : 'ip-XXX-XXX-XXX-XXX' monitor on user request
|
230
|
+
|
231
|
+
[UTC Mar 11 03:46:25] info : 'mysql' monitor on user request
|
232
|
+
|
233
|
+
[UTC Mar 11 03:46:25] info : Monit daemon with PID 3500 awakened
|
234
|
+
|
235
|
+
[UTC Mar 11 03:46:25] info : Awakened by User defined signal 1
|
236
|
+
|
237
|
+
[UTC Mar 11 03:46:25] info : 'mysql' monitor action done
|
238
|
+
|
239
|
+
[UTC Mar 11 03:46:25] info : 'ip-XXX-XXX-XXX-XXX' monitor action done
|
240
|
+
|
241
|
+
[UTC Mar 11 03:46:25] error : 'mysql' process is not running
|
242
|
+
|
243
|
+
[UTC Mar 11 03:46:25] info : 'mysql' trying to restart
|
244
|
+
|
245
|
+
[UTC Mar 11 03:46:25] info : 'mysql' start: '/etc/init.d/mysql start'
|
246
|
+
|
247
|
+
[UTC Mar 11 03:47:31] info : 'mysql' process is running with pid 3783
|
248
|
+
|
249
|
+
```
|
1
mysqlエラーログを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,6 +31,8 @@
|
|
31
31
|
よろしくお願いいたします。
|
32
32
|
|
33
33
|
|
34
|
+
|
35
|
+
[monit(log)]
|
34
36
|
|
35
37
|
```
|
36
38
|
|
@@ -119,3 +121,73 @@
|
|
119
121
|
PHP Version 5.4.11
|
120
122
|
|
121
123
|
CentOS release 6.4 (Final)
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
### 3/11追記
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
/var/run/mysql/mysql.pidは無かったためファイルだけ作成しました。
|
132
|
+
|
133
|
+
[mysql.log]に表示されるように「/var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid」に変更すべきでしょうか。
|
134
|
+
|
135
|
+
```CentOS6
|
136
|
+
|
137
|
+
#touch mysql.pid
|
138
|
+
|
139
|
+
```
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
[mysql.log]
|
144
|
+
|
145
|
+
```
|
146
|
+
|
147
|
+
Version: '10.0.1-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
|
148
|
+
|
149
|
+
200310 06:19:27 mysqld_safe A mysqld process already exists
|
150
|
+
|
151
|
+
200310 06:20:56 mysqld_safe A mysqld process already exists
|
152
|
+
|
153
|
+
200310 13:27:24 mysqld_safe Number of processes running now: 0
|
154
|
+
|
155
|
+
200310 13:27:24 mysqld_safe mysqld restarted
|
156
|
+
|
157
|
+
200310 13:27:25 InnoDB: The InnoDB memory heap is disabled
|
158
|
+
|
159
|
+
200310 13:27:25 InnoDB: Mutexes and rw_locks use GCC atomic builtins
|
160
|
+
|
161
|
+
200310 13:27:25 InnoDB: Compressed tables use zlib 1.2.3
|
162
|
+
|
163
|
+
200310 13:27:25 InnoDB: Using Linux native AIO
|
164
|
+
|
165
|
+
200310 13:27:25 InnoDB: CPU does not support crc32 instructions
|
166
|
+
|
167
|
+
200310 13:27:25 InnoDB: Initializing buffer pool, size = 768.0M
|
168
|
+
|
169
|
+
InnoDB: mmap(815923200 bytes) failed; errno 12
|
170
|
+
|
171
|
+
200310 13:27:25 InnoDB: Completed initialization of buffer pool
|
172
|
+
|
173
|
+
200310 13:27:25 InnoDB: Fatal error: cannot allocate memory for the buffer pool
|
174
|
+
|
175
|
+
200310 13:27:25 [ERROR] Plugin 'InnoDB' init function returned error.
|
176
|
+
|
177
|
+
200310 13:27:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
|
178
|
+
|
179
|
+
200310 13:27:25 [Note] Plugin 'FEEDBACK' is disabled.
|
180
|
+
|
181
|
+
200310 13:27:25 [ERROR] Unknown/unsupported storage engine: InnoDB
|
182
|
+
|
183
|
+
200310 13:27:25 [ERROR] Aborting
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
200310 13:27:25 [Note] /usr/sbin/mysqld: Shutdown complete
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
200310 13:27:25 mysqld_safe mysqld from pid file /var/lib/mysql/ip-XXX-XXX-XXX-XXX.pid ended
|
192
|
+
|
193
|
+
```
|