关于mongodb无法启动的问题

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

但其实 --fork并不能起作用

1.先清除data里的.lock文件

删除log里的config.log和configsvr.pid

2.修复模式启动

/www/server/mongodb/bin/mongod -f /www/server/mongodb/config.conf --repair  (路径填写自己的mongodb所在地址)

得到提示:

about to fork child process, waiting until server is ready for connections.
forked process: 7701
child process started successfully, parent exiting

成功修复

 

mongodb的异常关闭都会导致锁死无法启动,推荐mongod --shutdown -f .地址/mongodb.conf

                           千万不要 kill -9  pid

posted @ 2020-10-13 18:02  南宫煎饼  阅读(4780)  评论(0编辑  收藏  举报