mongodb replica set master “stateStr” : “REMOVED”
This server is shutdown every night and started again in the next morning.
After a few months running seamlessly, I’m having a few errors in the past few weeks. Happens that once or twice a week the mongo startup fails.
and as error message:
errmsg : "Our replica set config is invalid or we are not a member of it"
Looking at the mongo logs I have:
2016-06-07T12:01:48.724+0000 W NETWORK [ReplicationExecutor] getaddrinfo("database.my_vpc_dns.net") failed: Name or service not known
When this error happens, a simple restart on the docker container will fix, but I’m struggling to understand what is causing this error to happen occasionally.
One Solution collect form web for “mongodb replica set master “stateStr” : “REMOVED””
Probably the replica loses the configuration when doing the restart. It is possible that the replica loses the reading of the DNS reason why it does not manage to raise when the server is started.
What you can do is to point to the machine directly through the domain.my-machine in the
Execute db.isMaster() in primary to not restart.