centOS下mongodb 启动出错问题

  • Post author:
  • Post category:其他




问题详情

指令:

./mongod -f /usr/local/mongodb-4.4.1/conf/mongodb.conf

报错如下:

启动mongod时

{"t":{"$date":"2020-09-18T11:22:05.358+08:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":919}}
{"t":{"$date":"2020-09-18T11:22:05.358+08:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

启动mongo时

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



问题排查

  1. 按照网上教程删除了data/db下的mongod.lock无法启动,但是报错的信息改变了
  2. 尝试重新修复mongod

    命令如下

    [localhost bin]$./mongod --repair


    修复后无法启动
  3. 仔细看了启动mongod时的错误,提示不能允许mongo操作运行,怀疑是因为权限不够,所以选择使用sudo启动,命令如下

    sudo ./mongod -f /usr/local/mongodb-4.4.1/conf/mongodb.conf


    成功启动mongo

    在这里插入图片描述



总结与反思

在遇到问题时要多看系统报出log,而不是一味查看别人的教程。

学习之路漫漫,还需要更加努力前行!



版权声明:本文为qq_39640321原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。