zoukankan      html  css  js  c++  java
  • 【笔记】mongodb启动不了:child process failed, exited with error number 100

    今天在启动mongodb的时候,发现起不来,报错:child process failed, exited with error number 100然后先去/var/log/mongo/mongod.log 查看启动的日志,发现:
    <ignore_js_op> 

    **************
    Unclean shutdown detected.
    Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
    *************
    Sat Apr 20 09:40:31.286 [initandlisten] exception in initAndListen: 12596 old lock file, terminating


    看来应该是没有正常关闭mongodb引起的。根据提示的链接去看了下,要以修复的方式启动。

    <ignore_js_op> 
    先删除/var/lib/mongo下的mongod.lock
    <ignore_js_op> 
    然后以repair的模式启动:
    <ignore_js_op> 
    然后接着在启动一次
    <ignore_js_op> 
    现在就可以查看到mongod的进程存在了,可以正常使用了
    <ignore_js_op> 

    那么如何正常关闭mongodb?
    可以去看官方文档:
    http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/

    先通过shell连上服务器:
    mongo
    use admin
    db.shutdownServer()

    或者直接kill -15 <pid>,注意kill -9 可能会导致数据文件损坏

    转载来源:http://www.dataguru.cn/thread-107361-1-1.html

  • 相关阅读:
    strncat_s
    资源编译器 (.rc) 文件
    C++ Namespace 详解
    Structure Definitions
    SetParent
    C++笔记(1)explicit构造函数
    .def
    tellg()和tellp()
    Data Groups
    Messages
  • 原文地址:https://www.cnblogs.com/qiuer/p/5488588.html
Copyright © 2011-2022 走看看