how to setup mongodb replica on cloud server?
If you try to set up replica set of two (or more) nodes at one physical server... You must use IP-addresses and not host names. So 127.0.0.1:27017, 127.0.0.1:27019