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

时间: 2024-10-11 17:00:06

Mongodb异常关闭重启失败解决的相关文章

adb shell 杀进程以及端口占用,adbserver服务重启失败

linux: adb shell  ps |grep  netease 杀进程: adb shell kill [PID] //杀死进程 C:\Users\chenquan>adb shell psUSER PID PPID VSIZE RSS WCHAN PC NAMEroot 1 0 428 240 c01c0a90 08054ac6 S /initroot 2 0 0 0 c013a8a6 00000000 S kthreaddroot 3 2 0 0 c0128d84 00000000

解决Eclipse异常关闭后重启报 org.eclipse.swt.SWTException: Invalid thread access 的问题

. . . . . 很久没有写博客了,最近实在是太忙,一直想写点干货,但是一直没静下心来学习. 今天又在加班忙碌之中,结果谁知道越忙碌越出问题.先是 weblogic 没有正常启动,凭经验第一反应就是7001端口被其它程序占用了,然后通过命令查看之后,发现果然是被占用了,占用端口的竟然是Eclipse,查找占用端口的方式请移步至博主的另一篇文章<[windows]查询占用端口的程序——记一次解决webloigc启动失败的过程>. Eclipse之前是不占用7011端口的,这次占用估计可能是启动

eclipse在异常关闭后,导致无法启动workspace问题的解决

现象: 现在大多数java开发者使用的IDE都是eclipse,而且一般在一个workspace中,会有很多个项目,有些是open的,有些是关闭的.有时候eclipse在使用过程中会莫名其妙的异常中断关闭,再打开eclipse,选择workspace后,会一直停留在加载的页面上无法进入eclipse平台. 问题分析: 这个问题一直碰到,但具体原因不清楚,可能需要eclipse的开发工程师才能回答. 问题解决: 这个问题的解决办法至少有两个. 1.一个办法就是删除这个workspace的整个met

sql2008安装时提示重启计算机失败解决方法

安装sql 2008的时候,在检测安装环境中有一项是”重新启动计算机”显示的结果是“失败”.上网看了半天,找到了解决方案,虽然我没弄明白具体原因,但问题是解决了,解决方案如下: 一.Windows+R,在对话框中输入“regedit”,点击运行:二.此时会弹出注册表信息,在里面找到“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager”目录 三.删除“PendingFileRenameOperations”:四.关

异常详细信息: System.Data.SqlClient.SqlException:用户 &#39;IIS APPPOOL\DefaultAppPool&#39; 登录失败解决办法

1.安全性---登录名---新建登录名 2.常规----搜索 3.添加SERVICE用户-- 4.服务器角色---勾上sysadmin: IIS中: 应用程序池---对应的程序池上右键---高级设置 进程模块---标识---选择NetworkService(与数据库中设置统一) 异常详细信息: System.Data.SqlClient.SqlException:用户 'IIS APPPOOL\DefaultAppPool' 登录失败解决办法

eclipse异常关闭,无法启动tomcat解决办法

如果eclipse异常关闭,会出现以下 此时需要关闭javaw.exe即可,重新启动tomcat了. 关闭javaw.exe需要打开任务关闭器,选择详细信息,然后结束javaw.exe即可

解决当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭)的问题

当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭) 发生这种情况时 打开项目目录中的 Temp文件夹,可以找到 一个 UnityLockfile 文件 将这个文件删除就可以正常打开了

openoffice+swftools+flexPaper 转换文件失败解决办法

一.首先是OpenOffice的进程关闭的问题,原因比较多,大多数是文件转换失败,导致服务崩溃. 如文件过大,字符集不识别等.                                                                                                     通过两个批处理文件,监控soffice.exe进程,如果没有,则重新启动, openOffice.bat 始终启动,监控进程,如果没有则执行run.bat @echo of

TCP中异常关闭链接的意义 异常关闭的情况

终止一个连接的正常方式是发送FIN. 在发送缓冲区中 所有排队数据都已发送之后才发送FIN,正常情况下没有任何数据丢失. 但我们有时也有可能发送一个RST报文段而不是F IN来中途关闭一个连接.这称为异常关闭 . 进程关闭socket的默认方式是正常关闭,如果需要异常关闭,利用 SO_LINGER选项来控制. 异常关闭一个连接对应用程序来说有两个优点: (1)丢弃任何待发的已经无意义的 数据,并立即发送RST报文段: (2)RST的接收方利用关闭方式来 区分另一端执行的是异常关闭还是正常关闭.