Getting error while setup Arbiter configuration
command i using for this : mongod --port 27017 --dbpath /home/mongodb/arb --replSet mongocluster --bind_ip localhost
The error i’m getting :
“ctx”:“monitoring-keys-for-HMAC”,“msg”:“Failed to refresh key cache”,“attr”:{“error”:“NotYetInitialized: Cannot use non-local read concern until replica set is finished initializing.”
And in primary node while setup : rs.addArb(“mongoArb:27017”)
I’m getting error on primary node :
{
“_id” : 4,
“name” : “MongoArb:27017”,
“health” : 0,
“state” : 8,
“stateStr” : “(not reachable/healthy)”,
“uptime” : 0,
“lastHeartbeat” : ISODate(“2022-10-17T13:53:03.212Z”),
“lastHeartbeatRecv” : ISODate(“1970-01-01T00:00:00Z”),
“pingMs” : NumberLong(0),
“lastHeartbeatMessage” : “not running with --replSet”,
“syncSourceHost” : “”,
“syncSourceId” : -1,
“infoMessage” : “”,
“configVersion” : -1,
“configTerm” : -1
}
Main error is here : “stateStr” : “(not reachable/healthy)” and “lastHeartbeatMessage” : “not running with --replSet”.
Please help me out to resolve this query. Thanks