错误:子进程失败,退出,错误号为51 MongoDB [英] ERROR: child process failed, exited with error number 51 MongoDB
本文介绍了错误:子进程失败,退出,错误号为51 MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
重新启动MongoDB时遇到此错误,我使用的是Mongo 3.2.4,并在新计算机上进行了设置
Getting this error while restarting MongoDB , I am using Mongo 3.2.4 and doing this set up on a new machine
Starting mongod... about to fork child process, waiting until server is ready for connections.
forked process: 19438
ERROR: child process failed, exited with error number 51
mongod(_ZN5mongo19MmapV1ExtentManager4initEPNS_16OperationContextE+0x4A8) [0x1040278]
mongod(_ZN5mongo26MMAPV1DatabaseCatalogEntryC1EPNS_16OperationContextENS_10StringDataES3_bb+0x187) [0x1036dc7]
mongod(_ZN5mongo12MMAPV1Engine23getDatabaseCatalogEntryEPNS_16OperationContextENS_10StringDataE+0x14E) [0x103a1de]
mongod(_ZN5mongo14DatabaseHolder6openDbEPNS_16OperationContextENS_10StringDataEPb+0x133) [0xac92a3]
----- END BACKTRACE -----
推荐答案
对我来说,由于对数据目录中某些文件的所有权不正确,因此发生了此错误.我使用以下命令修复了该问题:
For me this error occured due to incorrect ownership of some files in my data directory. I fixed this using the following command:
sudo chown -R mongodb: /path/to/db/directory
在我的情况下,mongodb是数据库用户.
Where mongodb was the database user in my case.
这篇关于错误:子进程失败,退出,错误号为51 MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文