我的配置文件是:
systemLog:
destination: file
logAppend: true
path: c:\data\log\mongod.log
storage:
dbPath: c:\data\db
journal:
enabled: true
replication:
replSetName: "rs0"
net:
bindIp: 127.0.0.1
port: 27017
security:
authorization: enabled
Run Code Online (Sandbox Code Playgroud)
并得到一个错误:
2018-07-07T15:40:25.092+0300 E QUERY [thread1] Error: error: {
"operationTime" : Timestamp(0, 0),
"ok" : 0,
"errmsg" : "node is not in primary or recovering state",
"code" : 13436,
"codeName" : "NotMasterOrSecondary",
"$clusterTime" : {
"clusterTime" : Timestamp(0, 0),
"signature" : {
"hash" : BinData(0,"FshG5mLBvAQUizPHXGfCITV4ZKA="),
"keyId" : NumberLong("6573732769795407873")
}
} …
Run Code Online (Sandbox Code Playgroud)