ITPub博客

首页 > 数据库 > NoSQL > MONGODB 回滚失败

MONGODB 回滚失败

原创 NoSQL 作者:gaopengtttt 时间:2014-11-25 16:17:52 0 删除 编辑
MONGODB 回滚失败:

{
                        "_id" : 5,
                        "name" : "192.168.190.7:27018",
                        "health" : 1,
                        "state" : 4,
                        "stateStr" : "FATAL",
                        "uptime" : 63,
                        "optime" : Timestamp(1414132121, 1),
                        "optimeDate" : ISODate("2014-10-24T06:28:41Z"),
                        "lastHeartbeat" : ISODate("2014-06-08T12:10:55Z"),
                        "lastHeartbeatRecv" : ISODate("2014-06-08T12:10:56Z"),
                        "pingMs" : 0,
                        "lastHeartbeatMessage" : "rollback error: not willing to roll back more than 30 minutes of data"
                }
        ],
        


查看资料:
In some cases, MongoDB decides that the rollback is too large to undertake. Rollback
can fail if there are more than 300 MB of data or about 30 minutes of operations to roll
back. In these cases, you must resync the node that is stuck in rollback


如下进行重新配置:
首先删除出错的节点
rs.remove("192.168.190.7:27018")


然后停止原出错节点,删除所有的数据文件。并且按照配置重启
[root@testora1 db]# rm -rf *
./mongod ~/.mongodb.conf 


加入节点
rs.add({"_id":5,"host":"192.168.190.7:27018","priority":1})


这样及可以进行重新配置
查看状态
{
                        "_id" : 5,
                        "name" : "192.168.190.7:27018",
                        "health" : 1,
                        "state" : 5,
                        "stateStr" : "STARTUP2",
                        "uptime" : 602,
                        "optime" : Timestamp(1413699079, 2838693),
                        "optimeDate" : ISODate("2014-10-19T06:11:19Z"),
                        "self" : true
                }
        ],

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7728585/viewspace-1346197/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 一次SQL分析
请登录后发表评论 登录
全部评论
wxh gp_22389860 公众号 MySQL学习 书籍 深入理解MySQL主从原理

注册时间:2021-06-07

  • 博文量
    868
  • 访问量
    3495546