Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mongodb Mongod不干净关机_Mongodb_Repair - Fatal编程技术网

Mongodb Mongod不干净关机

Mongodb Mongod不干净关机,mongodb,repair,Mongodb,Repair,这是我的新功能…所以我的MONGOD意外关闭,我似乎无法修复它…这是我尝试启动时看到的。/MONGOD **2018-04-21T19:59:06.237+0000 ** WARNING: --rest is specified without --httpinterface, 2018-04-21T19:59:06.238+0000 ** enabling http interface warning: bind_ip of 0.0.0.0 is unnecessary; l

这是我的新功能…所以我的MONGOD意外关闭,我似乎无法修复它…这是我尝试启动时看到的。/MONGOD

**2018-04-21T19:59:06.237+0000 ** WARNING: --rest is specified without --httpinterface,
2018-04-21T19:59:06.238+0000 **          enabling http interface
warning: bind_ip of 0.0.0.0 is unnecessary; listens on all ips by default
2018-04-21T19:59:06.241+0000 [initandlisten] MongoDB starting : pid=2848 port=27017 dbpath=data 64-bit host=omarr11-webdevbootcamp-5900192
2018-04-21T19:59:06.241+0000 [initandlisten] db version v2.6.12
2018-04-21T19:59:06.241+0000 [initandlisten] git version: d73c92b1c85703828b55c2916a5dd4ad46535f6a
2018-04-21T19:59:06.241+0000 [initandlisten] build info: Linux build5.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2018-04-21T19:59:06.241+0000 [initandlisten] allocator: tcmalloc
2018-04-21T19:59:06.241+0000 [initandlisten] options: { net: { bindIp: "0.0.0.0", http: { RESTInterfaceEnabled: true, enabled: true } }, storage: { dbPath: "data", journal: { enabled: false } } }
************** 
Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
*************
2018-04-21T19:59:06.241+0000 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
2018-04-21T19:59:06.241+0000 [initandlisten] dbexit: 
2018-04-21T19:59:06.241+0000 [initandlisten] shutdown: going to close listening sockets...
2018-04-21T19:59:06.241+0000 [initandlisten] shutdown: going to flush diaglog...
2018-04-21T19:59:06.241+0000 [initandlisten] shutdown: going to close sockets...
2018-04-21T19:59:06.241+0000 [initandlisten] shutdown: waiting for fs preallocator...
2018-04-21T19:59:06.242+0000 [initandlisten] shutdown: closing all files...
2018-04-21T19:59:06.242+0000 [initandlisten] closeAllFiles() finished
2018-04-21T19:59:06.242+0000 [initandlisten] dbexit: really exiting now**
谁能帮我修一下这个吗

您应该在的数据文件夹中查找锁文件(mongod.lock) mongodb,您需要删除它并尝试重新启动


如果您有一些数据损坏问题,您可以尝试修复选项。但是,如果只是正常的学习过程,删除mongod.lock文件应该再次启动mongod过程…

可能重复您是否尝试过建议的方法(“请访问以获取恢复说明”)?您似乎已禁用日志,因此最好的恢复选项(除了从备份中恢复)是根据日志输出中的链接运行数据库修复命令。在尝试任何修复之前,请确保备份了数据文件。我强烈建议继续启用该日志,并升级到受支持的MongoDB版本(2.6于2016年10月到期)。嗨,Stennie。。谢谢你的答复。。是的,我已经试过了,但还是没能解决这个问题。。我是新手,所以我不知道如何启用日志。。你能指导我启用日志吗?让它工作吧。。需要删除的是mongod.lock文件..现在工作正常。。谢谢Devesh这正是问题所在。。我将cd放入数据中..找到了“mongod.lock”文件并将其删除..它正在工作。。谢谢