mongoDB非正常关闭后无法启动问题:
http://my.oschina.net/GivingOnenessDestiny/blog/53804
http://codingstandards.iteye.com/blog/1214093
前段时间不小心非正常关闭了mongoDB,准备重启却发现不行,错误信息如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
Tue Apr 17 11:13:30 Tue Apr 17 11:13:30 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability. Tue Apr 17 11:13:30 Tue Apr 17 11:13:30 [initandlisten] MongoDB starting : pid=7128 port=27017 dbpath=D:\Programs\mongodb204\db 32-bit host=FALCON Tue Apr 17 11:13:30 [initandlisten] Tue Apr 17 11:13:30 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data Tue Apr 17 11:13:30 [initandlisten] ** see http: //blog .mongodb.org /post/137788967/32-bit-limitations Tue Apr 17 11:13:30 [initandlisten] ** with --journal, the limit is lower Tue Apr 17 11:13:30 [initandlisten] Tue Apr 17 11:13:30 [initandlisten] db version v2.0.4, pdfile version 4.5 Tue Apr 17 11:13:30 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506cb21f8ebf Tue Apr 17 11:13:30 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=0, build=6002, platform=2, service_pack= 'Service Pack 2' )BOOST_LIB_VERSION=1_42 Tue Apr 17 11:13:30 [initandlisten] options: { dbpath: "D:\Programs\mongodb204\db" } ************** Unclean shutdown detected. Please visit http: //dochub .mongodb.org /core/repair for recovery instructions. ************* Tue Apr 17 11:13:30 [initandlisten] exception in initAndListen: 12596 old lock file , terminating Tue Apr 17 11:13:30 dbexit: Tue Apr 17 11:13:30 [initandlisten] shutdown : going to close listening sockets... Tue Apr 17 11:13:30 [initandlisten] shutdown : going to flush diaglog... Tue Apr 17 11:13:30 [initandlisten] shutdown : going to close sockets... Tue Apr 17 11:13:30 [initandlisten] shutdown : waiting for fs preallocator... Tue Apr 17 11:13:30 [initandlisten] shutdown : closing all files... Tue Apr 17 11:13:30 [initandlisten] closeAllFiles() finished Tue Apr 17 11:13:30 dbexit: really exiting now |
解决方法:
1、删除%MONGO_HOME%/db下的.lock文件
2、输入命令 mongod --repair
3、重启mongoDB
标签:
mongodb
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux glibc自带哈希表的用例及性能测试
· 深入理解 Mybatis 分库分表执行原理
· 如何打造一个高并发系统?
· .NET Core GC压缩(compact_phase)底层原理浅谈
· 现代计算机视觉入门之:什么是图片特征编码
· 手把手教你在本地部署DeepSeek R1,搭建web-ui ,建议收藏!
· Spring AI + Ollama 实现 deepseek-r1 的API服务和调用
· 数据库服务器 SQL Server 版本升级公告
· C#/.NET/.NET Core技术前沿周刊 | 第 23 期(2025年1.20-1.26)
· 程序员常用高效实用工具推荐,办公效率提升利器!