Mongodb异常关闭重启失败解决
情况再现,连接mongodb的网站没有关,直接关闭了mongodb的cmd窗口。再次打开mongodb出现失败。
解决办法:网上说是删除 *.lock文件,再进行 --repair ,最后再打开mongodb就可以了(我没有删除 *.lock,也可以)
参考: http://dochub.mongodb.org/core/repair for recovery instructions.
D:\mongodb\bin>mongod --dbpath d:\mongodb\data\db
2015-07-03T07:59:56.140+0800 I CONTROL
2015-07-03T07:59:56.140+0800 W CONTROL 32-bit servers don't have journaling ena bled by default. Please use --journal if you want durability.
2015-07-03T07:59:56.140+0800 I CONTROL
2015-07-03T07:59:56.171+0800 W - [initandlisten] Detected unclean shutdow n - d:\mongodb\data\db\mongod.lock is not empty.
2015-07-03T07:59:56.187+0800 I STORAGE [initandlisten] **************
Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
*************
2015-07-03T07:59:56.187+0800 I STORAGE [initandlisten] exception in initAndList en: 12596 old lock file, terminating
2015-07-03T07:59:56.187+0800 I CONTROL [initandlisten] dbexit: rc: 100
D:\mongodb\bin>mongod --dbpath d:\mongodb\data\db --repair
2015-07-03T08:37:23.937+0800 I CONTROL
2015-07-03T08:37:23.937+0800 W CONTROL 32-bit servers don't have journaling ena bled by default. Please use --journal if you want durability.
2015-07-03T08:37:23.937+0800 I CONTROL
2015-07-03T08:37:23.953+0800 W - [initandlisten] Detected unclean shutdow n - d:\mongodb\data\db\mongod.lock is not empty.
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] MongoDB starting : pid=3 356 port=27017 dbpath=d:\mongodb\data\db 32-bit host=WWW-AB2946767CC
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten]
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] ** NOTE: This is a 32 bi t MongoDB binary.
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] ** 32 bit builds a re limited to less than 2GB of data (or less with --journal).
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] ** Note that journ aling defaults to off for 32 bit and is currently off.
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] ** See http://doch ub.mongodb.org/core/32bit
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten]
2015-07-03T08:37:23.984+0800 I CONTROL [initandlisten] ** NOTE: your operating system version does not support the method that MongoDB
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] ** uses to detect impending page faults.
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] ** This may result in slower performance for certain use cases
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten]
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] targetMinOS: Windows XP SP3
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] db version v3.0.4
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] git version: 0481c958dae b2969800511e7475dc66986fa9ed5
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] build info: windows sys. getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Servic e Pack 1') BOOST_LIB_VERSION=1_49
2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] allocator: tcmalloc 2015-07-03T08:37:24.000+0800 I CONTROL [initandlisten] options: { repair: true, storage: { dbPath: "d:\mongodb\data\db" } }
2015-07-03T08:37:24.250+0800 I STORAGE [initandlisten] repairDatabase local
2015-07-03T08:37:24.484+0800 I INDEX [initandlisten] allocating new ns file d :\mongodb\data\db\_tmp_repairDatabase_0\local.ns, filling with zeroes...
2015-07-03T08:37:24.812+0800 I STORAGE [FileAllocator] allocating new datafile d:\mongodb\data\db\_tmp_repairDatabase_0\local.0, filling with zeroes...
2015-07-03T08:37:24.812+0800 I STORAGE [FileAllocator] creating directory d:\mo ngodb\data\db\_tmp_repairDatabase_0\_tmp
2015-07-03T08:37:24.812+0800 I STORAGE [FileAllocator] done allocating datafile d:\mongodb\data\db\_tmp_repairDatabase_0\local.0, size: 64MB, took 0 secs 2015-07-03T08:37:24.828+0800 I INDEX [initandlisten] build index on: local.st artup_log properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "local.startup_ log" }
2015-07-03T08:37:24.828+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.062+0800 I STORAGE [initandlisten] repairDatabase myworkblo gs
2015-07-03T08:37:25.312+0800 I INDEX [initandlisten] allocating new ns file d :\mongodb\data\db\_tmp_repairDatabase_0\myworkblogs.ns, filling with zeroes...
2015-07-03T08:37:25.578+0800 I STORAGE [FileAllocator] allocating new datafile d:\mongodb\data\db\_tmp_repairDatabase_0\myworkblogs.0, filling with zeroes...
2015-07-03T08:37:25.578+0800 I STORAGE [FileAllocator] creating directory d:\mo ngodb\data\db\_tmp_repairDatabase_0\_tmp
2015-07-03T08:37:25.578+0800 I STORAGE [FileAllocator] done allocating datafile d:\mongodb\data\db\_tmp_repairDatabase_0\myworkblogs.0, size: 64MB, took 0 sec s
2015-07-03T08:37:25.593+0800 I INDEX [initandlisten] build index on: myworkbl ogs.app_updates properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "myworkbl ogs.app_updates" }
2015-07-03T08:37:25.593+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.593+0800 I INDEX [initandlisten] build index on: myworkbl ogs.app_updates properties: { v: 1, key: { key: 1 }, name: "key_1", ns: "myworkb logs.app_updates", background: true, safe: null }
2015-07-03T08:37:25.593+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.609+0800 I INDEX [initandlisten] build index on: myworkbl ogs.galleries properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "myworkblog s.galleries" }
2015-07-03T08:37:25.609+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.609+0800 I INDEX [initandlisten] build index on: myworkbl ogs.galleries properties: { v: 1, unique: true, key: { key: 1 }, name: "key_1", ns: "myworkblogs.galleries", background: true, safe: null }
2015-07-03T08:37:25.609+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.625+0800 I INDEX [initandlisten] build index on: myworkbl ogs.postcategories properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "mywor kblogs.postcategories" }
2015-07-03T08:37:25.625+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.625+0800 I INDEX [initandlisten] build index on: myworkbl ogs.postcategories properties: { v: 1, unique: true, key: { key: 1 }, name: "key _1", ns: "myworkblogs.postcategories", background: true, safe: null }
2015-07-03T08:37:25.625+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] build index on: myworkbl ogs.posts properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "myworkblogs.po sts" }
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] build index on: myworkbl ogs.posts properties: { v: 1, unique: true, key: { slug: 1 }, name: "slug_1", ns : "myworkblogs.posts", background: true, safe: null }
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] build index on: myworkbl ogs.posts properties: { v: 1, key: { state: 1 }, name: "state_1", ns: "myworkblo gs.posts", background: true, safe: null }
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] build index on: myworkbl ogs.posts properties: { v: 1, key: { author: 1 }, name: "author_1", ns: "myworkb logs.posts", background: true, safe: null }
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] build index on: myworkbl ogs.posts properties: { v: 1, key: { publishedDate: 1 }, name: "publishedDate_1" , ns: "myworkblogs.posts", background: true, safe: null }
2015-07-03T08:37:25.640+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] build index on: myworkbl ogs.users properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "myworkblogs.us ers" }
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] build index on: myworkbl ogs.users properties: { v: 1, key: { email: 1 }, name: "email_1", ns: "myworkblo gs.users", background: true, safe: null }
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] build index on: myworkbl ogs.users properties: { v: 1, key: { isAdmin: 1 }, name: "isAdmin_1", ns: "mywor kblogs.users", background: true, safe: null }
2015-07-03T08:37:25.656+0800 I INDEX [initandlisten] building index using bulk method
2015-07-03T08:37:25.875+0800 I STORAGE [initandlisten] finished checking dbs
2015-07-03T08:37:25.875+0800 I CONTROL [initandlisten] now exiting
2015-07-03T08:37:25.875+0800 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-07-03T08:37:25.875+0800 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-07-03T08:37:25.875+0800 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-07-03T08:37:25.875+0800 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2015-07-03T08:37:25.890+0800 I STORAGE [initandlisten] shutdown: closing all fi les...
2015-07-03T08:37:25.890+0800 I STORAGE [initandlisten] closeAllFiles() finished
2015-07-03T08:37:25.890+0800 I STORAGE [initandlisten] shutdown: removing fs lo ck...
2015-07-03T08:37:25.890+0800 I CONTROL [initandlisten] dbexit: rc: 0
D:\mongodb\bin>mongod --dbpath d:\mongodb\data\db
2015-07-03T08:37:31.500+0800 I CONTROL 2015-07-03T08:37:31.500+0800 W CONTROL 32-bit servers don't have journaling ena bled by default. Please use --journal if you want durability. 2015-07-03T08:37:31.500+0800 I CONTROL 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] MongoDB starting : pid=2 852 port=27017 dbpath=d:\mongodb\data\db 32-bit host=WWW-AB2946767CC 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** NOTE: This is a 32 bi t MongoDB binary. 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** 32 bit builds a re limited to less than 2GB of data (or less with --journal). 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** Note that journ aling defaults to off for 32 bit and is currently off. 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** See http://doch ub.mongodb.org/core/32bit 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** NOTE: your operating system version does not support the method that MongoDB 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** uses to detect impending page faults. 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] ** This may result in slower performance for certain use cases 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] targetMinOS: Windows XP SP3 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] db version v3.0.4 2015-07-03T08:37:31.531+0800 I CONTROL [initandlisten] git version: 0481c958dae b2969800511e7475dc66986fa9ed5 2015-07-03T08:37:31.546+0800 I CONTROL [initandlisten] build info: windows sys. getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Servic e Pack 1') BOOST_LIB_VERSION=1_49 2015-07-03T08:37:31.546+0800 I CONTROL [initandlisten] allocator: tcmalloc 2015-07-03T08:37:31.546+0800 I CONTROL [initandlisten] options: { storage: { db Path: "d:\mongodb\data\db" } } 2015-07-03T08:37:31.578+0800 I NETWORK [initandlisten] waiting for connections on port 27017
Mongodb异常关闭重启失败解决的更多相关文章
- vsftpd重启失败解决方法
vsftpd dead,but subsys locked vsftpd已死,但是subsys被锁 关于VSFTPD服务器重启失败,研究了一晚上,当virtual_use_local_privs=ye ...
- adb shell 杀进程以及端口占用,adbserver服务重启失败
linux: adb shell ps |grep netease 杀进程: adb shell kill [PID] //杀死进程 C:\Users\chenquan>adb shell ...
- MongoDB实例重启失败探究(大事务Redo导致)
1.实例重启背景 收到监控组同学反馈,连接某一个MongoDB实例的应用耗时异常,并且出现了超时.查看数据库监控平台,发现此实例服务器的IO异常飙升,而查看副本集状态(rs.status()),主从是 ...
- eclipse异常关闭,而Tomcat然在运行解决方法
1.eclipse异常关闭,而Tomcat然在运行,再启动tomcat会出现端口冲突 解决方法:打开任务管理器,找到javaw.exe,点击关闭,就可以了
- MyEclipse异常关闭导致启动不了tomcat的解决方法
由于MyEclipse的异常关闭从而导致Tomcat并没有关闭,所以再次启动Tomcat当然是无法启动的啦,解决方法:在任务管理器中关闭一个叫javaw.exe的进程,如果你这时已经启动了MyEcl ...
- eclipse异常关闭,无法启动tomcat解决办法
如果eclipse异常关闭,会出现以下 此时需要关闭javaw.exe即可,重新启动tomcat了. 关闭javaw.exe需要打开任务关闭器,选择详细信息,然后结束javaw.exe即可
- 解决当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭)的问题
当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭) 发生这种情况时 打开项目目录中的 Temp文件夹,可以找到 一个 UnityLockfile 文件 将这个文件删除就可 ...
- TCP异常关闭研究分析
版权声明:本文由谢代斌原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/108 来源:腾云阁 https://www.qclo ...
- TCP中异常关闭链接的意义 异常关闭的情况
终止一个连接的正常方式是发送FIN. 在发送缓冲区中 所有排队数据都已发送之后才发送FIN,正常情况下没有任何数据丢失. 但我们有时也有可能发送一个RST报文段而不是F IN来中途关闭一个连接.这称为 ...
随机推荐
- 借助Glances Monitor,密切关注你的系统
两种方法安装 glances 通常可以有两种方法安装 glances.第一种是通过编译源代码的方式,这种方法比较复杂另外可能会遇到软件包依赖性问题.还有一种是使用特定的软件包管理工具来安装 glanc ...
- 大型网站演化(转载 http://homeway.me/2014/12/10/think-about-distributed-clusters/)
0x01.大型网站演化 简单说,分布式是以缩短单个任务的执行时间来提升效率的,而集群则是通过提高单位时间内执行的任务数来提升效率. 集群主要分为:高可用集群(High Availability Clu ...
- RobotFrameWork WebService Soap接口测试 (一)
在做完基于http协议的接口测试之后,开始弄soap协议了,之前有过开发java webservice自动化框架的经验,所以我想着应该并不会很难.对于webservice的简介,服务器端和客户端的开发 ...
- 十八、Java基础--------IO流体系以及字符流
在上一章节中详细介绍集合框架的相关知识,在接下来的几篇文章中将讲述Java中另一个及其重要的知识——IO流,本文主要是讲述IO流的一些基本概念以及字符流的相关应用. IO流 介绍IO流之前先介绍一下什 ...
- 前端开发面试题JS
1.介绍js的基本数据类型. Undefined.Null.Boolean.Number.String. ECMAScript 2015 新增:Symbol(创建后独一无二且不可变的数据类型 ) 2. ...
- html里面的相对路径和绝对路径
HTML有两种路径的写法:相对路径和绝对路径. 相对路径是在同一个目录的文件引用,如果源文件和引用文件在同一个目录里,直接写引用文件名即可. 如: a.html: c:\test\menu\a ...
- js数组去重方法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- python(七)字符串格式化、生成器与迭代器
字符串格式化 Python的字符串格式化有两种方式:百分号方式.format方式 1.百分号的方式 %[(name)][flags][width].[precision]typecode (name) ...
- 遗传算法在JobShop中的应用研究(part1: 绪论)
1. 什么是JobShop问题 Job,中文翻译成工件.一个工件又由若干道工序加工完成. resource, 资源.在本文的车间调度中资源指的是机器,每道工序要在某个特定机器上加工. Constrai ...
- 5----table类型
table类型是非常重要的Lua数据类型,也是Lua唯一能描述数据结构的类型 table类型可以很灵活的描述多种数据结构,其本身是基于键值对的形式存储数据的 字典结构 字典结构的table 的两种创建 ...