项目启动异常报错的大概内容是:
about to fork child process, waiting until server is ready for connections.
forked process: 25468
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.
mongodb非正常关闭后,再次启动会产生about to fork child process, waiting until server is ready for connection此异常。
解决方案:
删除mongodb 的data目录下的mongod.lock文件,重启mongodb即可。该文件会生成在日志文件下(跟bin目录同级)
记得加sudo重启