exception in initAndListen: 12596 old lock file, terminating,fileexception

來源:互聯網
上載者:User

exception in initAndListen: 12596 old lock file, terminating,fileexception

#mongd -f /etc/mongodb.conf時報錯


monogdb.log日誌分析

Unclean shutdown detected.

Please visit http://dochub.mongodb.org/core/repair for recovery instructions.*************

Wed Nov  5 04:14:35.951 [initandlisten] exception in initAndListen: 12596 old lock file, terminating

Wed Nov  5 04:14:35.951 dbexit: 

Wed Nov  5 04:14:35.951 [initandlisten] shutdown: going to close listening sockets...

Wed Nov  5 04:14:35.951 [initandlisten] shutdown: going to flush diaglog...

Wed Nov  5 04:14:35.951 [initandlisten] shutdown: going to close sockets...

Wed Nov  5 04:14:35.951 [initandlisten] shutdown: waiting for fs preallocator...

Wed Nov  5 04:14:35.951 [initandlisten] shutdown: closing all files...

Wed Nov  5 04:14:35.951 [initandlisten] closeAllFiles() finishe

Wed Apr  1 04:14:35.951 dbexit: really exiting now

提示錯誤分析:存在一個久的mongod.lock檔案

根本原因:雲主機意外關機,導致資料庫未正常關閉

解決辦法:刪除mongod.lock檔案,再次重啟資料庫

#mv mongod.lock mongod.lock.bak

#mongd -f /etc/mongodb.conf

檢查資料庫有無異常

後續作業:如果有異常建議執行


>db.repairDatabase()

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.