mongodb启动异常:about to fork child process, waiting until server is ready for connection

时间:2022-06-01 12:50:56

mongodb启动异常:about to fork child process, waiting until server is ready for connection

用Ctrl + C退出mongodb后再次登录出现以下的错误

mongodb启动异常:about to fork child process, waiting until server is ready for connection

我们进入mongodb的 data/db目录下

1.删除掉mongod.lock文件

2.bin目录下:./mongod --repair

3.再次重启 ./bin/mongod --config /data/mongodb.conf

但是依然是报错,没有办法正常启动。

我们使用ps aux | grep mongod命令查看mongodb的进程,用kill -9 pid杀掉进程

mongodb启动异常:about to fork child process, waiting until server is ready for connection

可是mongo的第二个进程一直在不断的刷新,没办法正常关闭掉

mongodb启动异常:about to fork child process, waiting until server is ready for connection

这是我想起来了mongodb.conf配置文件

mongodb启动异常:about to fork child process, waiting until server is ready for connection

我们将fork这个后台进程注释掉

再将data/db目录下的 mongod.lock 和 diagnostic.data文件删掉,这时再重启mongodb能够完美运行

mongodb启动异常:about to fork child process, waiting until server is ready for connection

mongodb启动异常:about to fork child process, waiting until server is ready for connection

原文地址:https://blog.csdn.net/weixin_43842451/article/details/106584027