Alibek Karimov
Alibek Karimov

Reputation: 53

mongod don't start after server crash

after server crashed, mongod service don't start. OS: Windows Server 2008 R2 start mongo version: 3.0.0 repair option don't help, journal directory is empty after crash update mongo to 3.0.2, this is all in log file:

2015-04-28T14:56:45.154+0600 I CONTROL  Hotfix KB2731284 or later update is     installed, no need to zero-out data files
2015-04-28T14:56:45.154+0600 W -        [initandlisten] Detected unclean shutdown - C:\Program Files\MongoDB\Server\3.0\data\mongod.lock is not empty.
2015-04-28T14:56:45.154+0600 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
2015-04-28T14:56:45.154+0600 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=3G,session_max=20000,eviction=(threads_max=4),statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2015-04-28T14:56:45.154+0600 I -        [initandlisten] Assertion: 28595:2: No such file or directory
2015-04-28T14:56:45.154+0600 I STORAGE  [initandlisten] exception in initAndListen: 28595 2: No such file or directory, terminating
2015-04-28T14:56:45.154+0600 I CONTROL  [initandlisten] dbexit:  rc: 100

Please. Help!!!

Upvotes: 2

Views: 3221

Answers (1)

Tajkia Rahman Toma
Tajkia Rahman Toma

Reputation: 472

I also faced similar error

Detected unclean shutdown - c:\Program Files\MongoDB\Data\mongod.lock is not empty.

Though the internal steps of my log file is not same as yours, the actual cause appears to be same.

In my case, I

  1. Opened the lock file (in your case it is located in C:\Program Files\MongoDB\Server\3.0\data\mongod.lock)
  2. Deleted all the content of the file
  3. Saved the file
  4. Started MongoDB server using windows service (How to run MongoDB as Windows service?)

And it started without any data loss!

Upvotes: 2

Related Questions