mongodb child process failed, exited with error number 51

about to fork child process, waiting until server is ready for connections.
forked process: 12233
ERROR: child process failed, exited with error number 51
To see additional information in this output, start without the "--fork" option.
  • mongodb4.0.13分片集羣報child process failed, exited with error number 51我遇到了這個異常,百度、Google一波,面向搜索引擎編程,得到的結果是這個異常大部分是因爲mongodb 服務的不正常關閉,導致mongod 被鎖;解決辦法:1、刪除MongoDb安裝目錄下的 mongod.lock 文件 2、mongod -f xxx.conf --repair 修復
  • 但是一頓操作後依然沒有解決;後面仔細看了下To see additional information in this output, start without the "--fork" option. 它說把fork去掉可以得到詳細日誌;於是便
    註釋了這個參數,便有了下面的:
  • Unrecognized option: sharding.pidFilePath 不能解析這個屬性這個屬性的值就是/var/run/mongodb/mongos.pid,我看了下沒有/var/run/mongodb/這個路徑
    在這裏插入圖片描述
  • 創建了這個路徑就能啓動了/var/run/mongodb/
    在這裏插入圖片描述
  • 這個問題應該是剛加了塊磁盤的原因。
  • 總結:child process failed, exited with error number 51這個異常原因可能很多最好把fork參數註釋掉,好對症下藥。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章