I setup a single member rs with bindIp: localhost,m.xxx.com. I got member[0].host “127.0.0.1:27017”.
How can I control which name to be used as member.host ?
I setup a single member rs with bindIp: localhost,m.xxx.com. I got member[0].host “127.0.0.1:27017”.
How can I control which name to be used as member.host ?
You do this through your config file, try putting the m.xxx.com first before the local host in the bindip.
When adding new members to the replica set make sure you do the rs.add with the hostname.
Thanks. I think this information should be in the official doc.