简体   繁体   中英

Unexpected shutdown of MongoDB. Unable to restart

My MongoDB is running on Windows Server2012 R2. I was able to access MongoDb until today when it crashed unexpectedly. The error logs are as follows:

2015-11-03T06:41:33.057-0800 I JOURNAL  [journal writer] error exception in dur::**journal error appending to file** c:\data\db\journal\j._1 8192 8192 errno:112 There is not enough space on the disk.
2015-11-03T06:41:33.080-0800 F JOURNAL  [journal writer] **dbexception in journalWriterThread causing immediate shutdown**: 13517 error appending to file c:\data\db\journal\j._1 8192 8192 errno:112 **There is not enough space on the disk.**
2015-11-03T06:41:33.081-0800 I -        [journal writer] Invariant failure false src\mongo\db\storage\mmap_v1\dur_journal_writer.cpp 258
2015-11-03T06:41:37.818-0800 I CONTROL  [journal writer] mongod.exe    ...\src\mongo\util\stacktrace_win.cpp(175)                       mongo::printStackTrace+0x43
2015-11-03T06:41:37.818-0800 I CONTROL  [journal writer] mongod.exe    ...\src\mongo\util\log.cpp(135)                                  mongo::logContext+0x97
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] mongod.exe    ...\src\mongo\util\assert_util.cpp(147)                          mongo::invariantFailed+0xf0
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] mongod.exe    ...\src\mongo\db\storage\mmap_v1\dur_journal_writer.cpp(258)     `mongo::dur::JournalWriter::_journalWriterThread'::`1'::catch$0+0x8c
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] MSVCR120.dll                                                                   _unDNameEx+0x268
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] MSVCR120.dll                                                                   _BuildCatchObjectHelper+0x345
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] ntdll.dll                                                                      RtlCaptureContext+0x3c3
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] mongod.exe    ...\src\mongo\db\storage\mmap_v1\dur_journal_writer.cpp(244)     mongo::dur::JournalWriter::_journalWriterThread+0x35a
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] mongod.exe    ...\src\third_party\boost\libs\thread\src\win32\thread.cpp(185)  boost::`anonymous namespace'::thread_start_function+0x21
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] MSVCR120.dll                                                                   beginthreadex+0x107
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] MSVCR120.dll                                                                   endthreadex+0x192
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] KERNEL32.DLL                                                                   BaseThreadInitThunk+0x22
2015-11-03T06:41:37.820-0800 I CONTROL  [journal writer] 
2015-11-03T06:41:37.821-0800 I -        [journal writer] 

***aborting after invariant() failure

My DB has around 50GB of data and was growing continuously. The log says " error appending to the journal file. There is not enough space on the disk " .However, I still have around 20GB of free space on my C drive.

I am unable to connect to mongodb at all. I dont even have read only access. Is there any way I can connect to DB and restore my data.

I am not sure, But this could be due to pre-allocation of journal files. MongoDB normally tries to pre-allocate double the space used by the last journal.

So if your last journal file was of size 16GB, then you may need 32GB free space to start the MongoDB.

You can try to start your mongoDB server once with –nojournal option to check if this is problem. But MongoDB does not recommend to start with –nojournal option in Production environment

You can find more information about Journal files https://docs.mongodb.org/manual/tutorial/manage-journaling/

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM