问答详情
源自:4-1 复制集主节点和从节点

老师您好 我用的mongo 4.0 重启服务报错

imooc:PRIMARY> rs.reconfig(config)

{

"operationTime" : Timestamp(1539831832, 1),

"ok" : 0,

"errmsg" : "Support for replication protocol version 0 was removed in MongoDB 4.0. Downgrade to MongoDB version 3.6 and upgrade your protocol version to 1 before upgrading your MongoDB version",

"code" : 103,

"codeName" : "NewReplicaSetConfigurationIncompatible",

"$clusterTime" : {

"clusterTime" : Timestamp(1539831832, 1),

"signature" : {

"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),

"keyId" : NumberLong(0)

}

}

}

imooc:PRIMARY> 

  这个应该怎么解决

提问者:secrethaha 2018-10-18 11:07

个回答

  • UTHINK
    2020-09-22 17:32:07

    注意选择的延迟节点不要是主节点

  • 长城雇佣军
    2019-11-23 14:08:57

    config里加上protocolVersion : 1就好了

  • 顺气大萝卜
    2018-12-17 18:19:38

    我也遇到了!!!