Mongodb ReplicaSet更改配置格式

时间:2018-11-10 11:46:16

标签: mongodb

我有一个3节点的mongodb副本集,该副本集使用了我想更改为使用新Yaml语法的旧语法(非Yaml)语法

旧语法

auth = true
bind_ip = 0.0.0.0
dbpath = /var/lib/mongodb
fork = false
keyFile = /etc/mongod.key
logappend = true
logpath = /var/log/mongodb/mongod.log
nojournal = false
port = 27017
replSet = rs0
rest = false
smallfiles = false

Yaml文件

net:
    bindIp: 0.0.0.0
    port: 27017
    http:
        enabled: true
        RESTInterfaceEnabled: true
storage:
    dbPath: /var/lib/mongodb
    mmapv1:
        smallFiles: false
    journal:
        enabled: false
processManagement:
    fork: false
security:
    keyFile: /etc/mongod.key
    authorization: enabled
systemLog:
    logAppend: true
    path = /var/log/mongodb/mongod.log
replication:
    replSetName: "rs0"

我已经在主数据库上进行了更改,但是它无法正常启动。我在日志中收到以下错误消息

  

SyncSourceFeedback错误发送更新到:27017:   CallbackCanceled:记者不再有效

我对错误进行了搜索,但未能找到解决方案。 副本集正在运行mongo v3.4.9

注意:将其移至https://dba.stackexchange.com/questions/222278/mongodb-replicaset-changing-config-format

0 个答案:

没有答案