Mongodb報錯:ERROR: child process failed, exited with error number 1


Mongodb在啟動時報錯:

2018-10-16T11:18:54.533+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
about to fork child process, waiting until server is ready for connections.
forked process: 1462
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the "--fork" option.

 

網上的大部分說的原因是,mongodb服務沒有正常關閉,例如使用了kill -9 PID殺掉,mongod 被鎖。

如何解決這種問題:

  1. 刪除 mongod.lock 文件和日志文件 mongodb.log ,如果有必要把 log日志全部刪除

  2. mongod --repair --dbpath /data/db / --repairpath /tmp/mongodb

 

我是首次安裝,肯定不是這種情況,於是檢查了下,MongoDB的數據存儲目錄和日志目錄,發現權限有問題,修改權限后就可以了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM