when i tried to start mongodb using the command "mongod.exe" on the command line, it throws the following error..
当我试图用“mongod”命令启动mongodb时。在命令行上,它抛出以下错误。
C:\mongodb-win32-x86_64-2.0.6\bin>mongod.exe
mongod.exe --help for help and startup options
Thu Aug 09 11:56:48 [initandlisten] MongoDB starting : pid=6892 port=27017 dbpat
h=/data/db 64-bit host=user4-PC
Thu Aug 09 11:56:48 [initandlisten] db version v2.0.6, pdfile version 4.5
Thu Aug 09 11:56:48 [initandlisten] git version: e1c0cbc25863f6356aa4e31375add7b
b49fb05bc
Thu Aug 09 11:56:48 [initandlisten] build info: windows sys.getwindowsversion(ma
jor=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB
_VERSION=1_42
Thu Aug 09 11:56:48 [initandlisten] options: {}
**************
old lock file: \data\db\mongod.lock. probably means unclean shutdown,
but there are no journal files to recover.
this is likely human error or filesystem corruption.
found 3 dbs.
see: http://dochub.mongodb.org/core/repair for more information
*************
Thu Aug 09 11:56:48 [initandlisten] exception in initAndListen: 12596 old lock f
ile, terminating
Thu Aug 09 11:56:48 dbexit:
Thu Aug 09 11:56:48 [initandlisten] shutdown: going to close listening sockets..
.
Thu Aug 09 11:56:48 [initandlisten] shutdown: going to flush diaglog...
Thu Aug 09 11:56:48 [initandlisten] shutdown: going to close sockets...
Thu Aug 09 11:56:48 [initandlisten] shutdown: waiting for fs preallocator...
Thu Aug 09 11:56:48 [initandlisten] shutdown: lock for final commit...
Thu Aug 09 11:56:48 [initandlisten] shutdown: final commit...
Thu Aug 09 11:56:48 [initandlisten] shutdown: closing all files...
Thu Aug 09 11:56:48 [initandlisten] closeAllFiles() finished
Thu Aug 09 11:56:48 dbexit: really exiting now
i really cant start mongodb.. Help me to start mongodb as windows service and rectify the error. I already read the installation guide and followed the same but still throwing the error.
我真的不能启动mongodb。帮助我启动mongodb作为windows服务并纠正错误。我已经阅读了安装指南,并遵循了相同的步骤,但仍然抛出错误。
3 个解决方案
#1
37
Delete the lock file \data\db\mongod.lock
, and run mongod --repair
.
删除锁文件\data\db\mongod。锁定,运行mongod——修复。
源
#2
2
You definitely want to run repair if you remove the lock file. If you do run mongodb with journaling you should not have to repair. More info on both can be found at http://www.mongodb.org/display/DOCS/Durability+and+Repair
如果您删除了锁文件,您肯定希望进行修复。如果您使用日志运行mongodb,您不需要修复。更多信息可以在http://www.mongodb. org/display/docs/持久性+和+修复中找到。
#3
1
Bugfix If it don´t help to delete the mongodb.lock file, try to repair MongoDB with the command --repair
如果它不帮助删除mongodb,就会出现错误。锁定文件,尝试用命令修复MongoDB—修复。
Start MongoDB as a Service If you want to start MongoDB as a Service you can addthe command --service. if you have multiple instances, cou can use also --serviceName{name} and --serviceDisplayName{name} for uniqe names. You can find here more information about starting as a Service
启动MongoDB作为一个服务,如果您想启动MongoDB作为一个服务,您可以添加命令——服务。如果您有多个实例,则可使用serviceName{name}和-serviceDisplayName{name}用于uniqe名称。您可以在这里找到关于开始服务的更多信息。
#1
37
Delete the lock file \data\db\mongod.lock
, and run mongod --repair
.
删除锁文件\data\db\mongod。锁定,运行mongod——修复。
源
#2
2
You definitely want to run repair if you remove the lock file. If you do run mongodb with journaling you should not have to repair. More info on both can be found at http://www.mongodb.org/display/DOCS/Durability+and+Repair
如果您删除了锁文件,您肯定希望进行修复。如果您使用日志运行mongodb,您不需要修复。更多信息可以在http://www.mongodb. org/display/docs/持久性+和+修复中找到。
#3
1
Bugfix If it don´t help to delete the mongodb.lock file, try to repair MongoDB with the command --repair
如果它不帮助删除mongodb,就会出现错误。锁定文件,尝试用命令修复MongoDB—修复。
Start MongoDB as a Service If you want to start MongoDB as a Service you can addthe command --service. if you have multiple instances, cou can use also --serviceName{name} and --serviceDisplayName{name} for uniqe names. You can find here more information about starting as a Service
启动MongoDB作为一个服务,如果您想启动MongoDB作为一个服务,您可以添加命令——服务。如果您有多个实例,则可使用serviceName{name}和-serviceDisplayName{name}用于uniqe名称。您可以在这里找到关于开始服务的更多信息。