How can I fix "EMPTYUNREACHABLE" on deploying a test replset on my mac?
Try setting bind_ip to 127.0.0.1 or add an entry for `bogon' to your /etc/hosts?
mongodb appears to be getting the hostname() for the local system but it’s not resolvable.
I faced the exact issue today. I was able to start mongodb but not the replica sets. I had to delete the following line from the mongod.conf file
'bind_ip: "127.0.0.1"'
I also figured out that the mongod.conf files for mongodb and replica sets were different and stored at different locations, maybe because I brew installed the latest version of mongodb?. I found my replica set config file at "/usr/local/etc/mongod.conf".
FYI, I believe you hit this bug in 2.2.0:
https://jira.mongodb.org/browse/SERVER-7367
It is now fixed and scheduled for release in 2.2.1 - the fixes for 2.2.0 basically involve making sure that you use resolvable and reachable addresses for your sets because 2.2.0 tries to reach even local instances over the network.