Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections.

2023-12-04 0 964
目录
  • ⭐️ 报错分析
  • ⭐️ 解决方法
  • ⭐️ 再次启动 MongoDB 服务

在使用命令行启动 MongoDB 的时候报错:about to fork child process, waiting until server is ready for connections.forked process: 50411

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

Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections.

⭐️ 报错分析

造成这个报错的原因是 “MongoDB” 服务没有正常的关闭,在终端连接非正常断开后,再次执行 MongoDB 的时候报错。

这是 Mongod 启动的一个常见错误,在 MongoDB服务 启动后,会在数据存储的路径生成一个 lock 文件,非法关闭的时候,这个 lock 文件 没有干掉,所以在第二次启动的时候检查到有 lock 文件的存在,就报这个错误了。

Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections.

⭐️ 解决方法

解决这个问题的方法,其实也很简单,进入到数据存储路径,将该 “xxx.lock 文件” 删除掉就好。

# 这个路径是我的 MongoDB 的安装路径,请根据自己的安装路径进行操作。
cd /usr/local/var/mongodb/db
# 删除 \”lock 文件\”
rm -rf mongod.lock

⭐️ 再次启动 MongoDB 服务

执行命令:mongod –dbpath /usr/local/var/mongodb/db ,启动OK。

Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections.

到此这篇关于Mongodb启动报错完美解决方案:about to fork child process, waiting until server is ready for connections.的文章就介绍到这了,更多相关Mongodb启动报错内容请搜索悠久资源以前的文章或继续浏览下面的相关文章希望大家以后多多支持悠久资源!

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 MongoDB Mongodb启动报错完美解决方案:about to fork child process,waiting until server is ready for connections. https://www.u-9.cn/database/mongodb/70468.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务