安装第一次后MongoDB无法启动

时间:2015-09-04 06:21:10

标签: mongodb

我想在我的Windows 7机器上第一次安装MongoDB。我将它安装到默认位置(c:/)。

当我第一次执行mongod.exe时,我收到消息'the waiting for connections message in the console'。 MongoDB的文档要求在另一个cmd提示符上连接并再次执行mongod.exe

当我这样做时,我收到以下消息:

C:\Program Files\MongoDB\Server\3.0\bin>mongod.exe
2015-09-04T11:31:23.880+0530 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-04T11:31:23.905+0530 W -        [initandlisten] Detected unclean shutdown - C:\data\db\mongod.lock is not empty.

2015-09-04T11:31:23.907+0530 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to create/open lock file:
C:\data\db\mongod.lock errno:32 The process cannot access the file because it is being used by another process.. Is a mo
ngod instance already running?, terminating
2015-09-04T11:31:23.907+0530 I CONTROL  [initandlisten] dbexit:  rc: 100

C:\Program Files\MongoDB\Server\3.0\bin>mongod.exe
2015-09-04T11:33:52.437+0530 I CONTROL  Hotfix KB2731284 or later update is not installed, will zero-out data files
2015-09-04T11:33:52.442+0530 W -        [initandlisten] Detected unclean shutdown - C:\data\db\mongod.lock is not empty.

2015-09-04T11:33:52.445+0530 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to create/open lock file:
C:\data\db\mongod.lock errno:32 The process cannot access the file because it is being used by another process.. Is a mo
ngod instance already running?, terminating
2015-09-04T11:33:52.445+0530 I CONTROL  [initandlisten] dbexit:  rc: 100

P.S。:我在/data/db创建了C:/

1 个答案:

答案 0 :(得分:1)

好吧,我刚遇到同样的问题。我安装了修复程序,但只看到相同的错误。这就是我如何克服它:只需在C目录中创建一个文件夹结构,如下所示:C:\ data \ db。所以它对我很有用。我使用的是Windows 7 x64。