| 214 | |
| 215 | == mongodサービスが起動しない |
| 216 | |
| 217 | /var/log/mongodb/mongodb.logに下記のようなメッセージを吐いて停止したときは、 |
| 218 | |
| 219 | {{{ |
| 220 | 2015-12-10T18:05:07.169+0900 [initandlisten] exception in initAndListen: 12596 old lock file, terminating |
| 221 | 2015-12-10T18:05:07.169+0900 [initandlisten] dbexit: |
| 222 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: going to close listening sockets... |
| 223 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: going to flush diaglog... |
| 224 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: going to close sockets... |
| 225 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: waiting for fs preallocator... |
| 226 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: lock for final commit... |
| 227 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: final commit... |
| 228 | 2015-12-10T18:05:07.169+0900 [initandlisten] shutdown: closing all files... |
| 229 | 2015-12-10T18:05:07.169+0900 [initandlisten] closeAllFiles() finished |
| 230 | 2015-12-10T18:05:07.169+0900 [initandlisten] dbexit: really exiting now |
| 231 | }}} |
| 232 | |
| 233 | 次のコマンドでリペアする。 |
| 234 | |
| 235 | {{{ |
| 236 | # sudo -u mongodb mongod --repair --dbpath /var/lib/mongodb/ |
| 237 | }}} |