Mongodb报错:ERROR: child process failed, exited with error number 1


Mongodb在启动时报错:

2018-10-16T11:18:54.533+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
about to fork child process, waiting until server is ready for connections.
forked process: 1462
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.

 

网上的大部分说的原因是,mongodb服务没有正常关闭,例如使用了kill -9 PID杀掉,mongod 被锁。

如何解决这种问题:

  1. 删除 mongod.lock 文件和日志文件 mongodb.log ,如果有必要把 log日志全部删除

  2. mongod --repair --dbpath /data/db / --repairpath /tmp/mongodb

 

我是首次安装,肯定不是这种情况,于是检查了下,MongoDB的数据存储目录和日志目录,发现权限有问题,修改权限后就可以了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM