mongodb 我控制修补程序上的 Mongo 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29316482/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 20:21:48  来源:igfitidea点击:

Mongo error on I control hotfix

mongodbwindows-server-2008-r2

提问by Itsik Mauyhas

I have tried to start mongod.exe from my 2008 R2 server and im getting this error:

我试图从我的 2008 R2 服务器启动 mongod.exe 并且我收到此错误:

I CONTROL Hotfix kb2731284 or a later update is not installed, will zero-out files.

I didnt find any update or what is I CONTROL, someone have encounter with the problem? Thank you.

我没有找到任何更新或我控制的是什么,有人遇到过这个问题吗?谢谢你。

回答by Vadim Novozhilov

Well, I just faced the same issue. I installed the fix, but saw nothing but same error. So that's how I got over it: just create a folder structure in your C catalog like this one: C:\data\db. So it worked for me perfectly. I use Windows 7 x64.

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

回答by user1400290

I had to run the command in following format & it worked for me:

我必须以以下格式运行命令&它对我有用:

C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data

Ref: Original documentation link

参考:原始文档链接

回答by Josh M.

In my case the problem was that I had a space in my data path: E:\Program Files\MongoDB\Data\

就我而言,问题是我的数据路径中有一个空格: E:\Program Files\MongoDB\Data\

I ran dir /xwithin E:\to get the short path for Program Filesand used the short path instead: mongod.exe --dbpath E:\PROGRA~1\MongoDB\Data\

我跑dir /xE:\得到的短路径Program Files和所使用的短路径,而不是:mongod.exe --dbpath E:\PROGRA~1\MongoDB\Data\

It worked. Shocking that spaces in paths are still an issue!

有效。令人震惊的是路径中的空格仍然是一个问题!

回答by Mr.B

This known issue is in Windows 7. In Windows 8 this problem haven't appeared yet.

此已知问题在 Windows 7 中。在 Windows 8 中尚未出现此问题。

Firstly I would recommend to change your mongo installation path to path with folders names without gaps. For example, default mongo installation path is C:\program files\bla-bla... to avoid a wasting of time for looking for solutions of this issue, change your path to C:\mongo.. and make sure that you haven't names with gaps in your path.

首先,我建议将您的 mongo 安装路径更改为文件夹名称没有间隙的路径。例如,默认的 mongo 安装路径是 C:\program files\bla-bla... 为避免浪费时间寻找此问题的解决方案,请将您的路径更改为 C:\mongo.. 并确保您没有不是在你的路径中有空白的名字。

After that install this hot-fix.

之后安装此修补程序

Another thing I suggest you to do: Create folder data\db in disc C.

我建议您做的另一件事是:在光盘 C 中创建文件夹 data\db。

You could also change your mongo work path each time you use mongo shell, but it's overwork by my modest opinion. I've done these steps and my mongo has started to work.

您也可以在每次使用 mongo shell 时更改您的 mongo 工作路径,但我认为这是过度工作。我已经完成了这些步骤,我的 mongo 已经开始工作了。

回答by Nikhil Shinde

The above error comes when mongodbnot found the directory like "C:\data\db" which is by default when you install mongodbon your machine. So just go to c drive create a directory like "data\db" and now run the command "mongodb.exe".

当您在机器上安装时mongodb没有找到像“ C:\data\db”这样的目录时会出现上述错误mongodb。所以只需转到c驱动器创建一个像“data\db”这样的目录,然后运行命令“mongodb.exe”。

If you want to relocate the database location to any other drive say D drive in that case create a directory like "D:\mongodb\data" and run the command like "mongodb.exe --dbpath d:\mongodb\data".

如果您想将数据库位置重新定位到任何其他驱动器,请说 D 驱动器,在这种情况下创建一个类似“ D:\mongodb\data”的目录并运行类似“ mongodb.exe --dbpath d:\mongodb\data”的命令。

回答by Shekhar Sahu

I got the similar error

我得到了类似的错误

I CONTROL Hotfix kb2731284 or a later update is installed, will zero-out files.

Notice the message says later update is installednot later update is not installedin my case. But It was not starting the server.

请注意,该消息说later update is installed不是later update is not installed在我的情况下。但它没有启动服务器。

Creating a different folder structure for the db Drive\<mongo-db-folder>\<yourdb>and providing it with --dbpathflag while running the mongod worked for me. The short name for Program Files PROGRA~1didn't work for me. Maybe this has something to do with the rights managment.

为数据库创建不同的文件夹结构Drive\<mongo-db-folder>\<yourdb>--dbpath在运行 mongod 时为其提供标志对我有用。Program Files 的简称PROGRA~1对我不起作用。也许这与权利管理有关。

回答by NIKHIL CHAURASIA

By just creating a folder structure like below in my "C:\"drive , i resolved the issue :=>

通过在我的“C:\”驱动器中创建一个如下所示的文件夹结构,我解决了这个问题:=>

c:\data\db

c:\数据\数据库

enter image description here

在此处输入图片说明

Sometime it works without creating the above mentioned folder structure, i.e. MONGODB itself creates the same (as it worked for me in Windows 8 laptop) but sometimes it needs to be explicitly done (as i need to for my windows 7 installed desktop)

有时它在不创建上述文件夹结构的情况下工作,即 MONGODB 本身创建相同的(因为它在 Windows 8 笔记本电脑中对我有用)但有时需要明确完成(因为我需要为我的 Windows 7 安装的桌面)

Also you can browse through the complete installation and connection processfor MONGODB.

您也可以浏览MONGODB的完整安装和连接过程

回答by user5157405

Getting started on mongodb was not that difficult. Well I have been facing similar error on mongodb to start. I have getting error

mongodb 入门并不难。好吧,我在启动 mongodb 时遇到了类似的错误。我有错误



Services

服务

Windows could not start the MongoDB on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 100.

Windows 无法在本地计算机上启动 MongoDB。有关详细信息,请查看系统事件日志。如果这是一项非 Microsoft 服务,请联系服务供应商,并参考特定于服务的错误代码 100。

OK

好的

very simple way to overcome.

非常简单的方法来克服。

Solution is the Mongodb service has not been started

解决方法是mongodb服务没有启动

to do so. Open CMD in admin mode and type NET START "Mongodb" > This will start the service.

这样做。在管理员模式下打开 CMD 并输入 NET START "Mongodb" > 这将启动服务。

Inspite of this if services is not getting started or mongo.exe is not starting. It is coz your mongodb has locked the file. Mongodb is shared file system and it gets locked. You need to for mongo.lock file in your created dir. Delete the file and start the service. You should be able to start now.

尽管如此,如果服务未启动或 mongo.exe 未启动。这是因为您的 mongodb 已锁定该文件。Mongodb 是共享文件系统,它被锁定。您需要在您创建的目录中创建 mongo.lock 文件。删除文件并启动服务。你现在应该可以开始了。

Cheers

干杯

回答by user497087

Similiar to above, but I had a typo in my mongodb.cfg file which meant that Mongo couldn't find the data directory on startup. Fixed the typo and Mongo starts. Given the previous response I suspect that the failure to start is more of an issue over finding the data directory than the Hotfix message

与上面类似,但是我的 mongodb.cfg 文件中有一个错字,这意味着 Mongo 在启动时找不到数据目录。修正了错字,Mongo 启动。鉴于之前的响应,我怀疑启动失败更多是查找数据目录而不是修补程序消息的问题

回答by anandharshan

If you had got the below error message::

如果您收到以下错误消息:

2015-05-29T05:05:54.207+0530 I CONTROL Hotfix KB2731284 or later update is not installed, will zero-out data files 2015-05-29T05:05:54.219+0530 I STORAGE [initandlisten] exception in initAndLis en: 29 Data directory D:\data\db\ not found., terminating 2015-05-29T05:05:54.219+0530 I CONTROL [initandlisten] dbexit: rc: 100

2015-05-29T05:05:54.207+0530 I CONTROL 修补程序 KB2731284 或更高版本的更新未安装,会将数据文件归零 2015-05-29T05:05:54.219+0530 I STORAGE [initandlisten2Li9] 异常数据目录 D:\data\db\ not found., 终止 2015-05-29T05:05:54.219+0530 I CONTROL [initandlisten] dbexit: rc: 100

then just create a directory "D:\data\db\""

然后只需创建一个目录“D:\data\db\””

then restart the mongod

然后重启mongod

it should work fine

它应该可以正常工作