今天在启动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

最新文章

  1. C++库(Thrift)
  2. 超链接弹出QQ对话框
  3. spring源码学习之路---AOP初探(六)
  4. [转]分享一个用Telnet代替JLinkRTTClient的办法,实现同时显示和记录
  5. 获取滚动条ScrollBar宽度
  6. Asp.Net Web API 2 官网菜鸟学习系列导航[持续更新中]
  7. Xamarin.Android开发实践(九)
  8. iOS Node Conflict svn冲突
  9. struts2 拦截器 interceptor
  10. c# webbrowser 错误捕获
  11. Python性能优化的20条建议 (转载)
  12. Android手机开机自动启动
  13. chrome调试状态下动态加载的js
  14. 《Programming WPF》翻译 第3章 4.我们进行到哪里了?
  15. web.xml加载顺序详解
  16. Ubuntu_16.04 配置 Apache Rwrite URL 重写
  17. 微信公众平台企业号验证接口、回调 PHP版
  18. Asterisk 未来之路3.0_0007
  19. UVa 10812 - Beat the Spread!
  20. MySQL学习笔记(二):MySQL数据类型汇总及选择参考

热门文章

  1. 三星S4使用体验(Markdown版)
  2. Android SharedPreference 数据存储
  3. Windows 2003 VPN配置步骤[转]
  4. A Tour of Go Exercise: Loops and Functions
  5. GridLookUpEdit 简单应用
  6. android 中view的绘制过程
  7. HP QC(Quality Center)在Windows 7 IE8 IE9下不能工作解决方案
  8. TFS 2010 让安装更简单,也让VSS成为历史
  9. linux学习之八---Linux进程基础知识
  10. git版本号管理工具的上手