Mongo service crashed. Need to find reason of crash

前端 未结 3 565
栀梦
栀梦 2021-01-04 23:26

Today morning I found the following error with mongo, on my server.

*** System restart required ***
You have mail.
ubuntu@ip-xxx-xx-xx-xx:~$ mongo
MongoDB sh         


        
3条回答
  •  滥情空心
    2021-01-04 23:38

    According to MongoDB documentation

    The getLog command returns a document with a log array that contains recent messages from the mongod process log.

    Please try executing following command in mongo shell to return logs which consist of information related to errors or warnings while initialization of mongod service

    db.adminCommand({getLog: "startupWarnings" })
    

    For detailed description regarding getLog method please refer the documentation mentioned in following URL

    https://docs.mongodb.org/manual/reference/command/getLog/

提交回复
热议问题