mongodb出现的问题
about to fork child process, waiting until server is ready for connections.
forked process: 1039
ERROR: child process failed, exited with 1
To see additional information in this output, start without the "--fork" option.
解决方式
造成这个报错的原因是 “MongoDB” 服务没有正常的关闭,非法关闭的时候,有一个 lock 文件 没有干掉,所以在第二次启动的时候检查到有 lock 文件的存在,就报这个错误了。
解决这个问题的方法,其实也很简单,进入到数据存储路径,将该 “xxx.lock 文件” 删除掉就好。
然后重启:执行命令
/usr/local/mongodb-macos-aarch64-6.0.8 是你的mongodb路径
mongod --dbpath /usr/local/mongodb-macos-aarch64-6.0.8