mongodb分片集群突然停电造成一些错误,分片无法启动

本文涉及的产品
云数据库 MongoDB,独享型 2核8GB
推荐场景:
构建全方位客户视图
简介:

今天突然停电使mongodb分片集群造成这种错误,暂时不知道怎么解决,如果 有人知道请回复我

,现在把记录下来,等后期处理。

Fri Aug  8 10:49:52.165 [initandlisten] connection accepted from 172.16.0.115:59542 #2 (2 connections now open)
Fri Aug  8 10:49:52.954 [initandlisten] connection accepted from 172.16.0.103:33501 #3 (2 connections now open)
Fri Aug  8 10:49:52.954 [initandlisten] connection accepted from 172.16.0.103:33502 #4 (3 connections now open)
Fri Aug  8 10:49:52.955 [conn3] end connection 172.16.0.103:33501 (2 connections now open)
Fri Aug  8 10:49:55.104 [rsBackgroundSync] replSet syncing to: 172.16.0.115:11731
Fri Aug  8 10:49:55.108 [rsSync] replSet still syncing, not yet to minValid optime 53e421d7:3a
Fri Aug  8 10:49:55.154 [rsSync] getFile(): n=808581868
Fri Aug  8 10:49:55.154 [rsSync] Assertion: 10295:getFile(): bad file number value (corrupt db?): run repair
0xde0151 0xda188b 0x8d5465 0xb89952 0x818116 0x818244 0x81a4d4 0xa62bd5 0xa62c1c 0xab959c 0xa6c93c 0xc222ab 0xc28184 0xc28728 0xc2b45d 0xc2b73c 0xe289d9 0x3dffe0683d 0x3dfeed503d 
 /home/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde0151]
 /home/mongodb/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x9b) [0xda188b]
 /home/mongodb/bin/mongod(_ZN5mongo8Database7getFileEiib+0x395) [0x8d5465]
 /home/mongodb/bin/mongod(_ZNK5mongo7DiskLoc3recEv+0x42) [0xb89952]
 /home/mongodb/bin/mongod(_ZNK5mongo16NamespaceDetails11inCapExtentERKNS_7DiskLocE+0x26) [0x818116]
 /home/mongodb/bin/mongod(_ZN5mongo16NamespaceDetails10__capAllocEi+0xc4) [0x818244]
 /home/mongodb/bin/mongod(_ZN5mongo16NamespaceDetails11cappedAllocEPKci+0x2e4) [0x81a4d4]
 /home/mongodb/bin/mongod(_ZN5mongo16NamespaceDetails6_allocEPKci+0x25) [0xa62bd5]
 /home/mongodb/bin/mongod(_ZN5mongo16NamespaceDetails5allocEPKci+0x3c) [0xa62c1c]
 /home/mongodb/bin/mongod(_ZN5mongo11DataFileMgr17fast_oplog_insertEPNS_16NamespaceDetailsEPKci+0x1ec) [0xab959c]
 /home/mongodb/bin/mongod(_ZN5mongo11_logOpObjRSERKNS_7BSONObjE+0x4cc) [0xa6c93c]
 /home/mongodb/bin/mongod(_ZN5mongo7replset8SyncTail15applyOpsToOplogEPSt5dequeINS_7BSONObjESaIS3_EE+0x4b) [0xc222ab]
 /home/mongodb/bin/mongod(_ZN5mongo7replset8SyncTail16oplogApplicationEv+0x584) [0xc28184]
 /home/mongodb/bin/mongod(_ZN5mongo11ReplSetImpl11_syncThreadEv+0xb8) [0xc28728]
 /home/mongodb/bin/mongod(_ZN5mongo11ReplSetImpl10syncThreadEv+0x2d) [0xc2b45d]
 /home/mongodb/bin/mongod(_ZN5mongo15startSyncThreadEv+0x6c) [0xc2b73c]
 /home/mongodb/bin/mongod [0xe289d9]
 /lib64/libpthread.so.0 [0x3dffe0683d]
 /lib64/libc.so.6(clone+0x6d) [0x3dfeed503d]
Fri Aug  8 10:49:55.166 [rsSync] replSet syncThread: 10295 getFile(): bad file number value (corrupt db?): run repair
Fri Aug  8 10:49:56.105 [rsSyncNotifier] replset setting oplog notifier to 172.16.0.115:11731
Fri Aug  8 10:50:02.191 [conn2] end connection 172.16.0.115:59542 (1 connection now open)
Fri Aug  8 10:50:02.191 [initandlisten] connection accepted from 172.16.0.115:59549 #5 (2 connections now open)
Fri Aug  8 10:50:06.228 [repl writer worker 1] Assertion: 10334:BSONObj size: 1342177280 (0x00000050) is invalid. Size must be between 0 and 16793600(16MB) First element: .: ?type=113
0xde0151 0xda188b 0xda1dcc 0x6ec92f 0xa2aad8 0xa2bfcc 0xa2c370 0x7fbcf0 0x8016d0 0x80180f 0x80180f 0x80190c 0x814173 0x8105f1 0x813291 0xb60b84 0xb6245e 0xb626be 0xa7c88b 0xa73af7 
 /home/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde0151]
 /home/mongodb/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x9b) [0xda188b]
 /home/mongodb/bin/mongod [0xda1dcc]
 /home/mongodb/bin/mongod(_ZNK5mongo7BSONObj14_assertInvalidEv+0x5bf) [0x6ec92f]
 /home/mongodb/bin/mongod(_ZNK5mongo5KeyV16toBsonEv+0x98) [0xa2aad8]
 /home/mongodb/bin/mongod(_ZNK5mongo5KeyV113compareHybridERKS0_RKNS_8OrderingE+0x3c) [0xa2bfcc]
 /home/mongodb/bin/mongod(_ZNK5mongo5KeyV19woCompareERKS0_RKNS_8OrderingE+0x230) [0xa2c370]
 /home/mongodb/bin/mongod(_ZNK5mongo11BtreeBucketINS_12BtreeData_V1EE4findERKNS_12IndexDetailsERKNS_5KeyV1ERKNS_7DiskLocERKNS_8OrderingERib+0x120) [0x7fbcf0]
 /home/mongodb/bin/mongod(_ZNK5mongo11BtreeBucketINS_12BtreeData_V1EE6locateERKNS_12IndexDetailsERKNS_7DiskLocERKNS_5KeyV1ERKNS_8OrderingERiRbS8_i+0x60) [0x8016d0]
 /home/mongodb/bin/mongod(_ZNK5mongo11BtreeBucketINS_12BtreeData_V1EE6locateERKNS_12IndexDetailsERKNS_7DiskLocERKNS_5KeyV1ERKNS_8OrderingERiRbS8_i+0x19f) [0x80180f]
 /home/mongodb/bin/mongod(_ZNK5mongo11BtreeBucketINS_12BtreeData_V1EE6locateERKNS_12IndexDetailsERKNS_7DiskLocERKNS_5KeyV1ERKNS_8OrderingERiRbS8_i+0x19f) [0x80180f]
 /home/mongodb/bin/mongod(_ZNK5mongo11BtreeBucketINS_12BtreeData_V1EE6locateERKNS_12IndexDetailsERKNS_7DiskLocERKNS_7BSONObjERKNS_8OrderingERiRbS8_i+0x8c) [0x80190c]
 /home/mongodb/bin/mongod(_ZN5mongo15BtreeCursorImplINS_12BtreeData_V1EE7_locateERKNS_7BSONObjERKNS_7DiskLocE+0x93) [0x814173]
 /home/mongodb/bin/mongod(_ZN5mongo11BtreeCursor33initWithoutIndependentFieldRangesEv+0x1f1) [0x8105f1]
 /home/mongodb/bin/mongod(_ZN5mongo11BtreeCursor4makeEPNS_16NamespaceDetailsERKNS_12IndexDetailsERKNS_7BSONObjES8_bi+0xa1) [0x813291]
 /home/mongodb/bin/mongod(_ZNK5mongo15CursorGenerator14shortcutCursorEv+0x6c4) [0xb60b84]
 /home/mongodb/bin/mongod(_ZN5mongo15CursorGenerator8generateEv+0x3e) [0xb6245e]
 /home/mongodb/bin/mongod(_ZN5mongo25NamespaceDetailsTransient9getCursorERKNS_10StringDataERKNS_7BSONObjES6_RKNS_24QueryPlanSelectionPolicyERKN5boost10shared_ptrIKNS_11ParsedQueryEEEbPNS_16QueryPlanSummaryE+0x3e) [0xb626be]
 /home/mongodb/bin/mongod(_ZN5mongo13deleteObjectsEPKcNS_7BSONObjEbbbPNS_11RemoveSaverE+0x14b) [0xa7c88b]
 /home/mongodb/bin/mongod(_ZN5mongo21applyOperation_inlockERKNS_7BSONObjEbb+0xc57) [0xa73af7]
Fri Aug  8 10:50:06.241 [repl writer worker 1] ERROR: writer worker caught exception: BSONObj size: 1342177280 (0x00000050) is invalid. Size must be between 0 and 16793600(16MB) First element: .: ?type=113 on: { ts: Timestamp 1407459783000|288, h: -3441636868876691989, v: 2, op: "d", ns: "mongotest1000.S270", fromMigrate: true, o: { _id: ObjectId('53dc305d31c6e0ce936d37ac') } }
Fri Aug  8 10:50:06.241 [repl writer worker 1]   Fatal Assertion 16360
0xde0151 0xd9ff43 0xc28aac 0xdada91 0xe289d9 0x3dffe0683d 0x3dfeed503d 
 /home/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde0151]
 /home/mongodb/bin/mongod(_ZN5mongo13fassertFailedEi+0xa3) [0xd9ff43]
 /home/mongodb/bin/mongod(_ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE+0x12c) [0xc28aac]
 /home/mongodb/bin/mongod(_ZN5mongo10threadpool6Worker4loopEv+0x281) [0xdada91]
 /home/mongodb/bin/mongod [0xe289d9]
 /lib64/libpthread.so.0 [0x3dffe0683d]
 /lib64/libc.so.6(clone+0x6d) [0x3dfeed503d]
Fri Aug  8 10:50:06.245 [repl writer worker 1]

***aborting after fassert() failure


Fri Aug  8 10:50:06.245 Got signal: 6 (Aborted).

Fri Aug  8 10:50:06.250 Backtrace:
0xde0151 0x6d0529 0x3dfee30330 0x3dfee302c5 0x3dfee31d70 0xd9ff7e 0xc28aac 0xdada91 0xe289d9 0x3dffe0683d 0x3dfeed503d 
 /home/mongodb/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xde0151]
 /home/mongodb/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6d0529]
 /lib64/libc.so.6 [0x3dfee30330]
 /lib64/libc.so.6(gsignal+0x35) [0x3dfee302c5]
 /lib64/libc.so.6(abort+0x110) [0x3dfee31d70]
 /home/mongodb/bin/mongod(_ZN5mongo13fassertFailedEi+0xde) [0xd9ff7e]
 /home/mongodb/bin/mongod(_ZN5mongo7replset14multiSyncApplyERKSt6vectorINS_7BSONObjESaIS2_EEPNS0_8SyncTailE+0x12c) [0xc28aac]
 /home/mongodb/bin/mongod(_ZN5mongo10threadpool6Worker4loopEv+0x281) [0xdada91]
 /home/mongodb/bin/mongod [0xe289d9]
 /lib64/libpthread.so.0 [0x3dffe0683d]
 /lib64/libc.so.6(clone+0x6d) [0x3dfeed503d]



本文转自 jxzhfei  51CTO博客,原文链接:http://blog.51cto.com/jxzhfei/1537319

相关实践学习
MongoDB数据库入门
MongoDB数据库入门实验。
快速掌握 MongoDB 数据库
本课程主要讲解MongoDB数据库的基本知识,包括MongoDB数据库的安装、配置、服务的启动、数据的CRUD操作函数使用、MongoDB索引的使用(唯一索引、地理索引、过期索引、全文索引等)、MapReduce操作实现、用户管理、Java对MongoDB的操作支持(基于2.x驱动与3.x驱动的完全讲解)。 通过学习此课程,读者将具备MongoDB数据库的开发能力,并且能够使用MongoDB进行项目开发。   相关的阿里云产品:云数据库 MongoDB版 云数据库MongoDB版支持ReplicaSet和Sharding两种部署架构,具备安全审计,时间点备份等多项企业能力。在互联网、物联网、游戏、金融等领域被广泛采用。 云数据库MongoDB版(ApsaraDB for MongoDB)完全兼容MongoDB协议,基于飞天分布式系统和高可靠存储引擎,提供多节点高可用架构、弹性扩容、容灾、备份回滚、性能优化等解决方案。 产品详情: https://www.aliyun.com/product/mongodb
相关文章
|
9天前
|
存储 NoSQL 前端开发
MongoDB 分片
10月更文挑战第17天
21 2
|
2月前
|
存储 监控 NoSQL
*MongoDB的水平扩展主要通过分片技术实
*MongoDB的水平扩展主要通过分片技术实
39 5
|
2月前
|
存储 NoSQL 前端开发
MongoDB 分片总结
这篇文章总结了MongoDB分片的概念、集群结构、分片实例、配置和测试过程。
51 6
|
3月前
|
存储 NoSQL 算法
MongoDB保姆级指南(中):从副本集群、分片集群起航,探索分布式存储的趋势!
本文一起来聊聊MongoDB集群,顺带以MongoDB集群为起点,共同探讨一下分布式存储的发展趋势~
167 15
|
3月前
|
存储 运维 NoSQL
轻松上手:逐步搭建你的高可用MongoDB集群(分片)
【8月更文挑战第13天】在数据激增的背景下,传统单机数据库难以胜任。MongoDB作为流行NoSQL数据库,采用分片技术实现水平扩展,有效处理海量数据。分片将数据分散存储,提高并发处理能力和容错性,是高可用架构基石。构建MongoDB集群需理解shard、config server和router三组件协同工作原理。通过具体实例演示集群搭建流程,包括各组件的启动及配置,确保数据高可用性和系统稳定性。合理规划与实践可构建高效稳定的MongoDB集群,满足业务需求并支持未来扩展。
77 0
|
4月前
|
自然语言处理 运维 NoSQL
MongoDB集群同步
实现 MongoDB Cluster-to-Cluster 即集群同步的工具是:mongosync 详情可参考如下官方文档: https://www.mongodb.com/zh-cn/docs/cluster-to-cluster-sync/current/quickstart/ 以上这个地址的文档一看就是机器翻译的,可能有不恰当的地方,但基本可参考使用。 以下是本次在某项目地配置集群同步的简要步骤,可参考使用。
82 6
|
6月前
|
NoSQL 算法 测试技术
【MongoDB 专栏】MongoDB 的自动分片与手动分片
【5月更文挑战第11天】MongoDB的分片技术在处理大规模数据和高并发场景中至关重要,提供自动和手动两种方式。自动分片基于预定义规则,简化管理,适合大部分场景,但灵活性有限。手动分片则允许用户自定义策略,实现高效布局,适用于有特殊需求的应用,但配置复杂。选择分片方式需考虑业务需求、数据特点和技术能力。正确实施分片策略能构建高性能、可扩展的系统,支持企业业务发展。随着技术进步,未来的分片技术将更加智能和易用。
168 3
【MongoDB 专栏】MongoDB 的自动分片与手动分片
|
5月前
|
存储 负载均衡 NoSQL
MongoDB的架构设计基于三种集群模式
【6月更文挑战第5天】MongoDB的架构设计基于三种集群模式
201 3
|
5月前
|
存储 负载均衡 NoSQL
MongoDB的分片功能
【6月更文挑战第6天】MongoDB的分片功能
59 1
|
4月前
|
负载均衡 NoSQL 中间件