MDB报错:about to fork child process, waiting until server is ready for connections. forked process:XX

在安装完MongoDB之后项目启动异常报错报错,的大概内容是:

[root@luntek mongodb]# ./bin/mongod --config /home/mongodb/mongodb.conf 

about to fork child process, waiting until server is ready for connections.
forked process: 25486
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.



解决方法:

解决1:

mongodb非正常关闭后,再次启动会产生about to fork child process, waiting until server is ready for connection此异常。

删除mongodb 的db目录下的mongod.lock文件,重启mongodb即可。该文件会生成在日志文件下(跟bin目录同级),cd 日志文件后 rm指令删除mongod.lock文件
MDB报错:about to fork child process, waiting until server is ready for connections. forked process:XX_第1张图片

解决2:
第一种方式是网上大部分的错误解决方式,lz是这种。
产生的原因是MongoDB的同级目录下的mongodb.conf配置文件路径配置错误,所以造成了该错误,如下错误
MDB报错:about to fork child process, waiting until server is ready for connections. forked process:XX_第2张图片
找到了问题点解决就十分简单了,进入配置文件中将文件的存储路径和日志路径配置正确即可,如下图

MDB报错:about to fork child process, waiting until server is ready for connections. forked process:XX_第3张图片

你可能感兴趣的:(数据库)