问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

ubuntu 15.10 mongodb.service 起不起来解决方案

发布网友 发布时间:2022-04-08 00:55

我来回答

3个回答

懂视网 时间:2022-04-08 05:16

解决办法:网上说是删除 *.lock文件,再进行 --repair ,最后再打开mongodb就可以了(我没有删除 *.lock,也可以)

参考: http://dochub.mongodb.org/core/repair for recovery instructions.

D:mongodbin>mongod --dbpath d:mongodbdatadb

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:mongodbdatadbmongod.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:mongodbin>mongod --dbpath d:mongodbdatadb --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:mongodbdatadbmongod.lock is not empty.

2015-07-03T08:37:23.984+0800 I CONTROL  [initandlisten] MongoDB starting : pid=3 356 port=27017 dbpath=d:mongodbdatadb 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:mongodbdatadb" } }

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 :mongodbdatadb\_tmp_repairDatabase_0local.ns, filling with zeroes...

2015-07-03T08:37:24.812+0800 I STORAGE  [FileAllocator] allocating new datafile d:mongodbdatadb\_tmp_repairDatabase_0local.0, filling with zeroes...

2015-07-03T08:37:24.812+0800 I STORAGE  [FileAllocator] creating directory d:mo ngodbdatadb\_tmp_repairDatabase_0\_tmp

2015-07-03T08:37:24.812+0800 I STORAGE  [FileAllocator] done allocating datafile  d:mongodbdatadb\_tmp_repairDatabase_0local.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 :mongodbdatadb\_tmp_repairDatabase_0myworkblogs.ns, filling with zeroes...

2015-07-03T08:37:25.578+0800 I STORAGE  [FileAllocator] allocating new datafile d:mongodbdatadb\_tmp_repairDatabase_0myworkblogs.0, filling with zeroes...

2015-07-03T08:37:25.578+0800 I STORAGE  [FileAllocator] creating directory d:mo ngodbdatadb\_tmp_repairDatabase_0\_tmp

2015-07-03T08:37:25.578+0800 I STORAGE  [FileAllocator] done allocating datafile  d:mongodbdatadb\_tmp_repairDatabase_0myworkblogs.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:mongodbin>mongod --dbpath d:mongodbdatadb

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:mongodbdatadb 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:mongodbdatadb" } } 2015-07-03T08:37:31.578+0800 I NETWORK  [initandlisten] waiting for connections on port 27017

Mongodb异常关闭重启失败解决

标签:

热心网友 时间:2022-04-08 02:24

使用了这个命令关闭mongodb,使得重启的时候,重启不了! 需要把mongodb.lock 这个文件删除掉才能启动! 而且还会偶尔发生数据丢失的事情,需要repair(./mongod --repair)一下才行! 看了一下文档,关闭mongodb有两种: 1.使用客户端mondo $ ./mongo > db.shutdownServer() 2. 直接 kill -2 PID," or kill -15 PID

热心网友 时间:2022-04-08 03:42

使用了这个命令关闭mongodb,使得重启的时候,重启不了! 

需要把mongodb.lock 这个文件删除掉才能启动! 

而且还会偶尔发生数据丢失的事情,需要repair(./mongod --repair)一下才行! 

看了一下文档,关闭mongodb有两种: 


使用客户端mondo 

$ ./mongo 

> db.shutdownServer() 


2. 直接 kill -2 PID," or kill -15 PID

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
开封跑滴滴需要什么手续 郑州的滴滴打车可以在开封好吗 集团管控有哪几种模式 集团管控五种模式 集团管控模式集团管控模式选择的主要影响因素 win10桌面图标间距变大了怎么调整 win10桌面图标间距变大了调整方法 南宁什么路有民生银行 南宁民生银行保安第一个月工资多少?? 如果电池在综合测试时,电压原本是3.7伏标准,但是一测试那个电压立马 保护板的线结对但是用检测板测试为什么检测灯不亮反插反而亮为什么? 我要送礼 要是送酒的话,什么酒好啊 500元-700元的什么酒好啊? 十八酒坊十五年和汾酒二十年有什么区别吗?自己家里喝,选哪款酒呢? 汾酒三胞胎是哪个 俗话说“宁可男大七,不可女大一”到底是什么意思? “水目”“木目心”“米大”“西女”各是什么字? 赏金猎人地下探测器淘宝有的买吗 女生大是什么意思 赏金猎人2016白金版地下金银探测器,它的价格是多少?能探测到几米?哪里能买到正品货? 山东大( ),一个“女”加个“ 曼”念什么? 女字旁的字大多和什么有关? 女大十一变是什么梗?? 大姐大是什么意思 女大一女大二女大三的说法是什么? 手机怎么玩勇者大战魔物娘啊 女大一是什么意思 redmi note 9 pro 会发烫么? 𦮗 这个字怎么念?正确的意思是什么!平时怎么用这个字?看清楚中间是女而不是大字 求一副铁路机务段的春节对联 “女”加“大”合成左右结构的一个字,仍读 “大”字,百度为何不收录?、 红米note9散热怎么样 徐州有卫岗牛奶订吗? 卫岗纯牛奶盒装和袋装的有什么区别吗?哪种好?价格差挺大的。 卫岗牛奶这个牌子的纯牛奶怎么样啊? 卫岗牛奶为什么不出名? 抱枕上是什么动漫里面的人物? 伊利 蒙牛 光明 卫岗哪个牛奶牌子好 抱枕上的动漫人物是谁,出自哪个动漫 打算一次性给孩子订购一个月的卫岗牛奶,小孩子一般喝什么样的口味比较适合? 求等身动漫抱枕图女性角色,越多越好(高清,无水印的)给后第一时间会采纳 为什么卫岗纯牛奶像水一样淡? 抱枕上的女主角是什么动漫里的。 这个抱枕上的动漫人物是哪个动漫里的?有高清图吗? 硬件:请问XMP和超频是不是应该当成一回事 买两条这个DDR3 2133 频率的内存条,可是卖家是要什么主板XMP,这是什么意思,是超频吗? iPhone xs max更新ios13.1.2之后听筒变很小声 触屏不灵 内存开启xmp是不是一直超频? 还有,我还有几样东西要买,动漫的抱枕准备入手,但是心大心细。。我只能买一个,但是很多动漫人物(女) 求A股行业的股票(龙头) 黄金的密度表是多少? 送英国男友什么礼物好?