Convert a Standalone to a Replica Set, not work
mongodb
Solution
It looks like your mongod already thinks it is part of a replicaset. If you run "rs.status()" you will probably see more than one host. Also, the hostname that mongod thinks it has, needs to be resolvable back to itself. Do not use "localhost" as a hostname in your replicaset configuration.
Problem
I need to Convert a Standalone to a Replica Set I'm using the following documentation: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/ After executing the following: ``` mongod --port 27017 --replSet rs0 ``` in the terminal shows me the following ``` Thu Nov 15 10:07:57 [rsStart] trying to contact MY_HOST.local:27017 Thu Nov 15 10:07:57 [rsStart] couldn't connect to MY_HOST.local:27017: couldn't connect to server MY_HOST.local:27017 Thu Nov 15 10:07:57 [rsStart] replSet can't get local.system.replset config from self or any seed (yet) ``` In mongo shell, the command results of rs.initiate() and rs.status(), are the following: ``` > rs.initiate() { "startupStatus" : 4, "info" : "rs0", "errmsg" : "all members and seeds must be reachable to initiate set", "ok" : 0 } > rs.status() { "startupStatus" : 4, "errmsg" : "can't currently get local.system.replset config from self or any seed (EMPTYUNREACHABLE)", "ok" : 0 } ``` Please I need help and tell me I'm doing wrong or what I'm missing Thanks for your attention